Another component for ZiGate

Brightness works fine as before.
I can turn off light with the switch but the state in HA does not turn off.
After that only way to turn on is to change brightness.

Ok now I’ve my bulb, my four wall switches but the wirelless stil not show . (44a9)
Don’t know why I have e7d9
image
image

About the bulb problem, are you sure you use the last version from my git ?

About the Switch it’s strange, Can I have the persistent file zigate.json ?
You said it doesn’t show what do you mean? the binary sensor has been created

Yes I’ve clone your repository in custom_components.
Git pull says it’s up to date.
I had the exact same behavior with Elrich component and my switches before.
The light turns off and then report on to HA so HA reset the state to on even if switch was off.

Here’s my zigate.json: http://termbin.com/c5sw
Binary sensor is created, but no switch.
And strange there’s no zigate.44a9 entity.
Only zigate.e7d9 with addr attribute to 44a9 as shown in my capture before.

Maybe I’m wrong but I think it’s normal there’s no switch because you cannot drive it.
It’s different than wall switch.

To me, you can only push the button with your finger and get the information on the binary_sensor in Hass

Did you try to call the service zigate.refresh_device ? It could solve the bulb problem

Ok the refresh actually solve the bulb problem thanks.

I’ll try to use wireless switch with only binary.
But it’s not exactly what I expect. For example I would like to use it to turn off all lights, I can use automation for it and use the binary to trigger the automation, but I can’t display it as a switch in the dashboard I have to display the automation.

I’m not sure to understand what you want to do.
This device is a dual binary_sensor, you can only use it state .

A switch in home assistant means that you can control it, change the state from home assistant, like your wall switch.

If you want to use it to control different light from home assistant, you have to setup a automation and use the binary_sensor to trigger the automation, from on to off or off to on depending on what you want.

You cannot display a binary_sensor as a switch (but you can customize the device class to change appearance)
default appearance
image
or using light as device class
image

automation example :

automation:
  - id: '1528203166925'
    alias: test
    trigger:
    - entity_id: binary_sensor.zigate_ab01_onoff
      platform: state
      from: 'off'
      to: 'on'
    action:
    - service: persistent_notification.create
      data:
        message: "TEST"

If you want a virtual switch on the dashboard and trigger a automation, use an input_boolean

Ok I did not think about a virtual switch.
Using your code the automation works but not all the time.
See logs below but when it does no work I cant see any state change for the binary sensor.
Try quick and long push, does not solve the issue.

Not working:

2018-07-09 11:26:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state zigate.e7d9=2018-07-09 11:26:35; max_tx=100, friendly_name=44a9, missing=False, max_rx=100, manufacturer=1037, power_type=0, battery=2.995, type=lumi.sensor_86sw2, ieee=00158d0001f480c8, descriptor_capability=00000000, addr=44a9, bit_field=0100000000000010, max_buffer=127, icon=mdi:access-point, receiver_on_when_idle=False, battery_level=35, server_mask=0, last_seen=2018-07-09 11:26:35, mac_capability=10000000, rssi=159, rssi_percent=62, id=0 @ 2018-07-09T13:26:35.406126+02:00>, entity_id=zigate.e7d9, new_state=<state zigate.e7d9=2018-07-09 11:26:37; max_tx=100, friendly_name=44a9, missing=False, max_rx=100, manufacturer=1037, power_type=0, battery=2.995, type=lumi.sensor_86sw2, ieee=00158d0001f480c8, descriptor_capability=00000000, addr=44a9, bit_field=0100000000000010, max_buffer=127, icon=mdi:access-point, receiver_on_when_idle=False, battery_level=35, server_mask=0, last_seen=2018-07-09 11:26:37, mac_capability=10000000, rssi=159, rssi_percent=62, id=0 @ 2018-07-09T13:26:37.678747+02:00>>

working:

2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state binary_sensor.zigate_44a9_onoff=off; addr=44a9, attribute=0, friendly_name=zigate_44a9_onoff, endpoint=1, cluster=6 @ 2018-07-09T13:26:29.716390+02:00>, entity_id=binary_sensor.zigate_44a9_onoff, new_state=<state binary_sensor.zigate_44a9_onoff=on; addr=44a9, attribute=0, friendly_name=zigate_44a9_onoff, endpoint=1, cluster=6 @ 2018-07-09T13:27:29.049220+02:00>>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state zigate.e7d9=2018-07-09 11:26:37; max_tx=100, friendly_name=44a9, missing=False, max_rx=100, manufacturer=1037, power_type=0, battery=2.995, type=lumi.sensor_86sw2, ieee=00158d0001f480c8, descriptor_capability=00000000, addr=44a9, bit_field=0100000000000010, max_buffer=127, icon=mdi:access-point, receiver_on_when_idle=False, battery_level=35, server_mask=0, last_seen=2018-07-09 11:26:37, mac_capability=10000000, rssi=159, rssi_percent=62, id=0 @ 2018-07-09T13:26:37.678747+02:00>, entity_id=zigate.e7d9, new_state=<state zigate.e7d9=2018-07-09 11:27:29; max_tx=100, friendly_name=44a9, missing=False, max_rx=100, manufacturer=1037, power_type=0, battery=2.995, type=lumi.sensor_86sw2, ieee=00158d0001f480c8, descriptor_capability=00000000, addr=44a9, bit_field=0100000000000010, max_buffer=127, icon=mdi:access-point, receiver_on_when_idle=False, battery_level=35, server_mask=0, last_seen=2018-07-09 11:27:29, mac_capability=10000000, rssi=198, rssi_percent=78, id=0 @ 2018-07-09T13:27:29.061787+02:00>>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state binary_sensor.zigate_44a9_onoff=on; addr=44a9, attribute=0, friendly_name=zigate_44a9_onoff, endpoint=1, cluster=6 @ 2018-07-09T13:27:29.049220+02:00>, entity_id=binary_sensor.zigate_44a9_onoff, new_state=<state binary_sensor.zigate_44a9_onoff=off; addr=44a9, attribute=0, friendly_name=zigate_44a9_onoff, endpoint=1, cluster=6 @ 2018-07-09T13:27:29.074181+02:00>>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.components.automation] Executing allumer gauche
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event logbook_entry[L]: name=allumer gauche, domain=automation, entity_id=automation.allumer_gauche, message=has been triggered>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.helpers.script] Script allumer gauche: Running script
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.helpers.script] Script allumer gauche: Executing step call service
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1975355152-296, domain=homeassistant, service=turn_on, service_data=entity_id=[‘light.tv’]>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1975355152-297, domain=light, service=turn_on, service_data=entity_id=[‘light.tv’]>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1975355152-297>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1975355152-296>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.helpers.script] Script allumer gauche: Executing step call service
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1975355152-298, domain=persistent_notification, service=create, service_data=message=TEST>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=None, entity_id=persistent_notification.notification, new_state=<state persistent_notification.notification=notifying; message=TEST @ 2018-07-09T13:27:29.138093+02:00>>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1975355152-298>
2018-07-09 11:27:29 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state automation.allumer_gauche=on; friendly_name=allumer gauche, last_triggered=2018-07-09T13:26:29.821565+02:00 @ 2018-07-09T13:22:28.516309+02:00>, entity_id=automation.allumer_gauche, new_state=<state automation.allumer_gauche=on; friendly_name=allumer gauche, last_triggered=2018-07-09T13:27:29.149381+02:00 @ 2018-07-09T13:22:28.516309+02:00>>

It could be interesting to set log level to debug for zigate too, so we can see who is eating the event

from configuration.yaml

logger:
  logs:
    zigate: debug

or calling service logger.set_level with data {“zigate”:“debug”}

About the entity_id zigate.e7d9 instead of 44a9, since there’s nothing wrong in the persistent file, could you check if you have done some customization to rename the entity_id ?
because there’s no reason to have such entity_id

http://termbin.com/dmpy
14:14:33 and 14:15:02

Nothing in my entity_registry.yaml http://termbin.com/4uwe
Should I search somewhere else ?

Thanks again for testing.
That’s what I was thinking about, the event is catched from zigate but probably to fast for the current zigate component.
I’ll fix that soon

Thanks again for developing !
Quick question, do you know if there’s a way to use friendly names in automation and groups ?
I’d like to use switch.cuisine_table in place of switch.zigate_84c3_switch_2 for example.
This provide cleaner config files.

In theory, you could use customize or entity registry to rename a entity_id but you’re right it doesn’t work.
I have to check

My issue with the bulb state is back.
I can only manage it with brightness but no reaction on the switch.
Actually the state remain off all the time.
http://termbin.com/9vez

No specific action before that on my side, only add the bulb in a scene to manage brightness during media playing.

Thanks for information
I have the same problem.
To solve it , temporary, just call refresh_device

I have to try it ! The other component seems not supported anymore.

I’m going to try it out and see how it works!

Awsome to see more work on Zigate!

1 Like

This component seems awesome. Gonna try everything when im back from vacation, See where i can help.
Thanks for the link in the other component Biau :slight_smile: