How to show Battery Level of Fibaro Devices connected to Fibaro HC2?

Integration of Fibaro Devices connected to HC2 into HA works very good. One reason why I moved from OH2 to HA. Now I want to display the battery level of all wireless Fibaro devices as I am doing this for the Homematic window sensors. For them exist separate entities I can display. But what have I got to do, to show battery level of my Fibaro smoke, water and motion detectors?

Thanks!

Do you got the battery level as a attributes in your states? You could do some templating to show them as a sensor in your HA

What I see in settings e.g. for the motion detector:
battery_level: 51
device_armed: true
fibaro_id: 42
friendly_name: Flur 41.0
icon: mdi:run
device_class: motion
What do you mean with ‘templating’?

My code for the battery level subtracted from the attribute is as followed.

  - platform: template
    sensors:  
      battery_level_door_sensor_525:
        friendly_name: 'Batterij Level Sensor Deur Voor'
        value_template: '{{ states.binary_sensor.door_window_sensor_158d0003456525.attributes.battery_level }}'
        unit_of_measurement: '%'    

You could do the same just simply use your entity id which could be

  - platform: template
    sensors:  
      battery_level_door_sensor_525: #just an entity id you can define for your battery
        friendly_name: 'Batterij Level Sensor Deur Voor'
        value_template: '{{ states.<your entity ID>.attributes.battery_level }}'
        unit_of_measurement: '%'    

I don’t know if this makes any sense to you but you could get it working like this

So it could look like this:

 - platform: template
    sensors:  
      battery_arbeitszimmer_60_0_1_63: 
        friendly_name: 'Batterie Rauchmelder Arbeitszimmer'
        value_template: '{{ states.binary_sensor.arbeitszimmer_60_0_1_63.attributes.battery_level }}'
        unit_of_measurement: '%'``

But where have I got to put this? In the configurations.yaml or in the Template editor?

Yes that should work. You need to put this in your configuration.yaml under “sensors”. Check your config and then restart HA. You can then put it in your Lovelace as a normal entity id.

be careful with your quotation marks in your code

Wrong

       unit_of_measurement: '%'``

Correct

       unit_of_measurement: '%'
1 Like

Excelent! It is working and I am adding now all the missing entities (Power Consumption of all of my Wall-Plugs, battery level of the smoke and flood sensors,…)
Thanks!

1 Like

Hi,

So I’m a bit confused. If Fibaro devices are z-wave, then why can’t a use them in HA without HC2?

Specifically, I’m liking the Fibrao water sensor. Won’t it work with just HA?

Thanks,
Ambi

Hi, yes, Fibaro devices do work just alone with HA, if you use a Z-Wave stick (which I have)
But all my z-wave devices are connected to the HC2 so I have integrated this into HA as I have done this with my Homematic devices as well.
I have set up some rules in the HC2 that are working fine. So far no need to disonnect all the devices (10 smoke sensors, 3 water sensors 10 wall plugs, 1 motion eye) and reconnect/set them up and build all the rules and logic.

That’s good, thanks! I can get a water sensor and let the group know how it works with HA directly.

Cheers,
Ambi