Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Anyway, for Insteon support I have the normal mht file for my Insteon devices and scenes (insteon.mht) then the insteon_MQTT.mht file (and the associate read_table file) that define how to interact with MQTT. There're many situations where the control of the device uses a different object than if we need to check state of the device. In the case of a scene, you set the scene object to turn the light on/off, but check the light controller itself for its state. In an example from the mht file:
- BROKER, insteon_lights, $config_parms{MQTT_Host}, $config_parms{MQTT_Port}, lights/*, mh-insteon, XXXXXXXXXXXXXXXXX
- LIGHT, insteon_lights, kitchen_fan_light, fl_kitchen_light, true,, Kitchen Fan Light
- We create a MQTT broker called insteon_lights, then create a light object for it that ties the scene "kitchen_fan_light" and the fanlinc "fl_kitchen_light" to it, and announce it to Home Assistant as "Kitchen Fan Light." The "true" just before that name means it's dimmable. If I had to re-do this, I might rearrange the parameters so I didn't need the extra commas, but it works.
- The SENSOR objects, I didn't get the announcement perfected, so I have a CODE line to announce them uniquely, as most are doors, but there's a pump, too.
- One caveat with this is that it's a little weird to set the dim level from a HA dashboard. It goes to 100%, then dims... and sometimes doesn't dim. IDK, I got tired of messing with it to figure that out.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement