Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement to _tze204_nklqjk62 #8448

Merged
merged 2 commits into from
Dec 7, 2024

Conversation

mattbyte
Copy link
Contributor

@mattbyte mattbyte commented Dec 6, 2024

Based on interrogation of the Tuya datapoints and testing, this PR exposes and more clearly documents the features of the Tuya PJ-ZGD01 garage door opener and also updates the implementation to use tuyaModernExtends. Care has been taken to avoid modifying the naming/behavior of the two existing exposed entities to avoid breaking changes.

Unsure on the purpose of await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']); in the original implementation as it seems to behave the same without it, including reporting the status of the contact roughly every minute and joining the network without issue.

@mattbyte
Copy link
Contributor Author

mattbyte commented Dec 6, 2024

For anyone using this with HA, adding this to your HA configuration.yaml will show the door as a cover to allow CarPlay integration via HomeKit. Assumes friendly name and HA entity name updated to "Garage Door" in Z2M.

cover:
  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Garage Door"
        unique_id: garage_door
        value_template: >-
          {% if is_state('binary_sensor.garage_door_garage_door_contact','off') %}closed
          {% else %}open
          {% endif %}
        open_cover:
          - condition: state
            entity_id: binary_sensor.garage_door_garage_door_contact
            state: "off"
          - action: switch.turn_on
            target:
              entity_id: switch.garage_door_trigger
        close_cover:
          - condition: state
            entity_id: binary_sensor.garage_door_garage_door_contact
            state: "on"
          - action: switch.turn_off
            target:
              entity_id: switch.garage_door_trigger
        icon_template: >-
          {% if states('binary_sensor.garage_door_garage_door_contact') == "on" %}
            mdi:garage-open-variant
          {% else %}
            mdi:garage-variant
          {% endif %}

@Koenkk Koenkk merged commit 5cce0fc into Koenkk:master Dec 7, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Dec 7, 2024

Thanks!

@mattbyte mattbyte deleted the Improvement-to-_TZE204_nklqjk62 branch December 9, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants