I made my own Pool temperature sensor using a Fibaro Door/window sensor (FGK104) and a temperature probe (DS18B20). Everything is working well:
I want to get a warning when the battery level drops below 15%. I created a binay sensor as follows:
binary_sensor:
- platform: template
pool_temperature_sensor_battery_low:
value_template: "{{ states.zwave.fibaro_system_fgk10x_door_opening_sensor.attributes.battery_level < 15 }}"
friendly_name: "Pool Temperature Sensor battery is low"
and the following alert that sends an email:
alert:
pool_temperature_battery:
name: Pool Temperature Sensor Battery is Low
entity_id: binary_sensor.pool_temperature_sensor_battery_low
repeat: 480
notifiers:
- gmail_madelinot
EVERYTHING seems to work just fine. I tested with different levels and the binary sensor is working and I do get the email messages. However, I have this cryptic message in my logs:
Could not render template Pool Temperature Sensor battery is low: UndefinedError: 'mappingproxy object' has no attribute 'battery_level'
Do you only get that at startup? It may be a case where you need to check the state of the sensor before trying to get an attribute. Without checking the state, during startup issues may appear when trying to access information that doesn’t exist yet.
The other problem could be that you aren’t grabbing the correct attribute because the shape of it’s dictionary differs from what you are requesting.
Can you post a pic of the attributes inside states.zwave.fibaro_system_fgk10x_door_opening_sensor?
Yes, it seems to be only at startup. I was thinking it could be that. Is there a way to check for a specific state (ie Ready or Complete) before assigning a value to a sensor? Maybe with an IF-THEN statement?
I can’t find these sensors anymore. I want to test outdoor fish pond temp, so I’ll try the Fibaro Implant with the same temp sensor used here. Anyone else use the Implant?
I’m testing the Fibaro implant now for something else. The main difference if that the implant does not have a battery and requires an external power source. I guess a 9v battery could work but I don’t know how long it would last. In any case, let us know of your results.
I see the newer door sensors have temp but use built-in temp and don’t seem to have connections for sensors.
I’ve got the Implant coming, and I’ll see that. It uses an external power supply, and that works for me because this will be outside measuring my fish-pond temp.
I was surprised at the unboxing video for the Fibaro Implant. It’s smaller than a pack of matches…like a big sugar cube! I’m going to stick it in an IP66 junction box with a waterproof power supply, and 3M temp sensors. It can take 6 but maybe I’ll do 2.