"Sensor_type" for Rflink devices

I read the docs for Rflink, https://home-assistant.io/components/sensor.rflink/
Here it says “sensor_type (Required): Override automatically detected type of sensor.”
But which are the valid values for this option?

1 Like

I’m wondering the same thing. Is it possible to have a template_sensor type? How would that be defined? @aequitas

@Whiskey thank for the notify.

@bphermansson all possible values are: https://github.com/aequitas/python-rflink/blob/master/rflink/parser.py#L61

So for example for a temperature type sensor temperature. I will update the docs (https://github.com/home-assistant/home-assistant.github.io/pull/2634).

1 Like

Oh OK, ‘sensor_type’ tells the front end what units to display. I thought it was something to do with HASS sensor types and that maybe I could assign a template to the RFLink sensor. I have been using MQTT sensors and they allow you to pull in the json values defined in your config.

I’ve been trying to get the packets received from my MiLight controller into HASS and to be honest I’m struggling I think I might use AppDaemon to sniff ‘decode packet’ events but was hoping for a cleaner solution. I’m not much of a programmer so this should be fun!

I hope you don’t mind and I’m not sure if it’s the correct thing to do but I have created a feature request for ‘value_template’ to be added to RFLink Sensors.

[Add RFLink Sensor/Switch 'value_template' attribute]
Add RFLink Sensor/Switch 'value_template' attribute

When not adding the sensors to config (but using automatic add) the sensor type is automatically discovered and the proper unit is configured. But if you specify your sensors in configuration you have to tell which type it is up front otherwise it cannot be created with the right type/unit.

Milight is not yet supported, I need to find time to work on it. If you could subscribe to this issue you will get a notification when I have an update to test: https://github.com/home-assistant/home-assistant/issues/6851