Another component for ZiGate

They will auto add.
Just remove all references in switches, lights or sensors.yaml

Currently, I’m changing many things to be able to make my PR accepted by HA
Please, just be patient :wink:

Thanks, I can confirm that my wireless switch works fine with latest commit.
Also magic does have a state I can use now but what’s the number after the state ?
For example :
flip90_54
flip180_1
push_1

Another little issue: transition does not work with light with my tradfri.
Is someone able to make it work ?

Magic cube movement explanation :
shake : when you shake it
wakeup : when you just touch/move it, only when the cube is sleeping…
drop : when the cube falls…

push_0 to push_5 : you push the cube in any direction, the number is the face number on top
flip180_0 to flip180_5 : when the cube flip to 180° , the number is the face number on top
double_tap_0 to double_tap_5 : when the cube hit the surface two times, the number is the face number on top
flip90 is a bit different, the format is flip90_xy where x is the previous face number on top and y the new face number on top
example:
If current face on top is 0 and I turn the cube to have face 5 on top, the state will be flip90_05
And if I revert to the previous position, the state will be flip90_50

I hope I have been understandable :wink:

it’s “normal” I haven’t enable transition :wink: What would you like to do ?

That means a LOT of combination if you identify face on the cube !
Completely clear Thanks

About the transition I would like to be able to use like in doc:


For example I do have a scene while watching kodi, when I pause the video the light turn brightness to 100 and when video start/restart the brightness is 30%.
I would like the transition to take something like 2 seconds from 100 to 30 and 5 seconds on the other way to let the eyes adapt to luminosity smoothly.

ok, I’ll add that.

About the cube, yes that’s a lot of combination but if for example you just want push and don’t care about the face number, just add a condition in your automation like

{% if "push" in trigger.state.to_state %}
...

Hi @doudz many thanks for that plug-in which was must user-friendly than the elric one.

I’ve just fork your code earlier in the week because I’m not really appreciate the need to use a service manually to be able to permit_join. So i’m working on adding “Zigate” inside “Integrations” part.

As I can see in a previous post, you continue to work on it to be able to submit it to HA. Did you have a roadmap or a board you can share ? I could be able to help you and I really want to use you your plugin, but I need to have a good user experience when using it.

I am using the zigate stick and want to switch to this component.
I have placed the different zigate files in custom_components/light, switch, sensor and binary_sensor
Still getting component not found.
Can someone point me out what I did wrong.
Thanks

Managed to get it right.
This is in the configuration file:
zigate:
host: 192.168.178.187

Got the following error:


I can connect to the stick through the browser

Well, I have no real road map but to me next steps are

  • fix the code as suggested to be able to merge the PR (that’s mean, improve some parts and cut down the PR to only support sensor for the first PR)
  • add the component in discovery

Add the component in “integrations” is a very good idea, Any help is accepted :slight_smile:

it looks like the component tries to find a usb zigate, not the wifi one…
I’ll check

ZiGate wifi is now working, the config was ignored.

zigate component is now a package instead of a module (zigate.py become zigate/__init__.py )

Another important breaking change, the persistent file zigate.json is now .zigate.json to be hidden to end user
To migrate, just stop HA, rename zigate.json to .zigate.json and restart HA

@doudz thanks for the fast update.
Going to try that now

@doudz works like you pointed out.
Can see the .zigate.json file with data.
I don’t see any devices in the entity list.

getting this error:


can see the device in .zigate.json[quote=“brugk000, post:75, topic:58417, full:true”]
@doudz works like you pointed out.
Can see the .zigate.json file with data.
I don’t see any devices in the entity list.

getting this error:


can see the device in .zigate.json
[/quote]

can now see the persistant notification when adding a device. very good work.
also can see the attributes updating, but stil no entity in the list.
this is the log:

whats the reason for the .zigate.json file?
Is it for recreating the entity’s after a reset?
I am losing my entity’s after a reset but can see the attributes update.

the .zigate.json will store various device attributes like manufacturer information, type name, device capabilities.
This kind of information are typically only available at pairing time

Oh … I’ll fix that…
Done

I am repairing a Xiaomi motion sensor, getting this result in my entity list:

This is in the log file:

After reset HA the entity is gone from the list and getting this persistant notification:

image

This is in the log file:

Still the attributes are updating in the log.

That’s good !
Ok the type is missing, but try to push one short time the pairing button, most of the time Xiaomi device send the type information