notoriousbdg / Home-AssistantConfig

Apache License 2.0
180 stars 49 forks source link

Ikea tradfri Simple dimmer battery status is not showing #8

Closed jodur closed 5 years ago

jodur commented 5 years ago

I have 2 tradfri remote. 1 Wireless dimmer 2 Remote control

The battery sensor for the remote control is created and showing up. The battery for for the wireless dimmer is not showing up.

The Wireless dimmer is in the entity list of home assistant

'''

sensor.tradfri_wireless_dimmer 87 battery_level: 87 model_number: TRADFRI wireless dimmer power_source: Battery manufacturer: IKEA of Sweden firmware_version: 1.2.248 serial: friendly_name: TRADFRI wireless dimmer unit_of_measurement: %

'''

notoriousbdg commented 5 years ago

It's odd that the state matches the battery_level attribute. If the state represents the battery level, you can use customize to set device_class to battery. and the package will treat it as a battery.

homeassistant:
  customize:
    sensor.tradfri_wireless_dimmer:
      device_class: battery

If the state doesn't represent the battery level, then try forcing a state change on the device or just wait for it to report in.

jodur commented 5 years ago

The Remote control has the same, state matches the battery_level attribute, however this battery is picked up by you package automatically. Will try your suggestion to modify the customize for the device

'''

sensor.tradfri_remote_control 74 battery_level: 74 model_number: TRADFRI remote control power_source: Battery manufacturer: IKEA of Sweden firmware_version: 1.2.214 serial: friendly_name: TRADFRI remote control unit_of_measurement: %

'''