-
Notifications
You must be signed in to change notification settings - Fork 37
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
Availability Sensor / Template Tracking #49
Comments
Hello, |
Hello, |
Each way has its own pros and cons, I personally prefer templates because then we don't have to set up extra boolean helpers or automations. So all the code responsible for an entity remains in a single place. But both solve the issue, you could go with whichever seems best. |
Hello, I started with the implementation, but I have a dilemma. In case the device is on, even if controller will go down it will stay on anyway, So make it it unavailable means, that user will loose track of the device. In case that device is off, it makes full sense to make it unavailable. What do you think? |
That is a valid point, Can we make it such that it restores the last known good state after it's available again. By good state i mean states excluding unavailable. I mean the implementation could be .. when the template tracking callback changes to unavailable store the previous state in hass[domain].data[device-uid] and on available again, apply the previous state. |
I am still not completely sure, if this is what user expect. I would propose following:
Additional question. My broadlink remore correctly reports state of the |
Hello, thank you for this info. Is there one entity with attributes? Or your IR remote has multiple entities in HA? In the case of broadlink remote, there is only one entity - i.e. remote.my_remote |
OK, last question. What if we use as a availability sensor directly availability of the entity set in configuration as controller_data attribute? |
I didn't understand that, can you give an example? |
Ok, sure. I use Broadlink controller. My If this device goes off (I unplug it), the state of the HA entity remote How is it with the MQTT / Zigbee devices? |
I don't own Zigbee, but for MQTT there is not a standardized entity/device. It will be up to the user to decide which sensor or entity to use for availability detection. For MQTT the mechanism is as follows:
|
Hello, |
Sure thing, will report back in a few hours |
Status not updating, also every time i restart HA the fan becomes unavailable and loses it's previous state. platform: smartir
name: Tanishq Room Atomberg
unique_id: tanishq_room_atomberg
device_code: 1175
# availability_sensor: sensor.ir_bridge_ssid
availability_template: "{{ not is_state('sensor.ir_bridge_ssid', 'unavailable') }}"
controller_data:
controller_type: MQTT
mqtt_topic: cmnd/tasmota_irbridge01/IRsend |
Describe the solution you'd like
OR
Additional context
It would be nice if the fan would become unavailable as the IR bridge does down or loses power, because practically it wont be able to send signal anyways.
The text was updated successfully, but these errors were encountered: