Closed WoodsterDK closed 6 years ago
And what about the sensor battery level - how do you handle that?
Here is battery level sensor example:
sensors:
- platform: mqtt
state_topic: 'home/switch/bath/status'
name: 'switch_bath_voltage'
value_template: "{{ (100-((3300 - float(value)) / (3300 - 2800)) * 100) | round(0) }}"
unit_of_measurement: '%'
Do you have an example of configuring the switch as a input withou coupling it to a automation directly, this is only one method to handle 'events' (not state change) that I know in HA (but my skills in HA are not so good =) ).
I am using it as it specified in README:
trigger:
platform: mqtt
topic: home/switch/hall/status
payload: 'click'
action:
service: script.hall_force_light_on
Yes, but that gives another sensor... Perhaps it is possible to make a customized mqtt sensor, that utilizes the attribute battery level...
I don't have such implementation and don't have enough skill to write it for HA.
Ok, I will see if i can do it.... will get back if you are interested.
Hi again, for a quick solution, I ended up adding additional sensors, and it seems to work quite well. Something different: Are you having ghost events from the door and movement sensor, as someone notices in the HA forum?
Hi.
No, i haven't any ghost events - only udp event miss (event is executed only by polling sensor - my setup polls all sensors every 2 seconds).
Does 2sec polling not decrease battery life?
No, because it polling gateway - not sensors.
Are you sure, no heavy battery use/drain?
100% sure, I use it in my setup for ~2 month.
Hi there, Do you have an example of configuring the switch as a input withou coupling it to a automation directly. Is it possible to assign a friendly name to each each type of click?