Activating scene with mqtt template-defined devices

I have some mqtt devices that are manually defined in configuration.yaml, as such:

  - platform: mqtt
    schema: template
    command_topic: 'insteon/command/modem'
    command_on_template: '{ "cmd" : "scene", "name" : "bedtime", "is_on" : 1 }'
    command_off_template: '{ "cmd" : "scene", "name" : "bedtime", "is_on" : 0 }'
    unique_id: 'bedtimelights'
    name: 'Bedtime Lights'

It just so happens that this “device” is actually a group of Insteon lights that I have defined as a scene. These devices show up in Lovelace as two separate lightning bolt icons, one to turn it on and one to turn it off. And when I tap on them, the behave as I would expect.

HASS seems to keep track of the last state of the device. Since this is a group of lights, it is possible that I have turned them all off using the off icon as described above, and then later on turn on one or more of the lights. In this case I have lights that are on, but the icon for the scene shows it is off. Again, this isn’t a problem because even if the off-icon is glowing, I can still tap on it, and it does indeed turn off all the lights.

HOWEVER, if I add that device to a HASS scene, and I choose the “Off” state for that device, when I activate the scene, which SHOULD command the device to off, it seems to look at the state of the device first, and won’t do anything if it is already in the off state.

I think that’s a lot of take in, so here’s a different way of describing it. I have a HASS scene with one “device”. That device is saved as being in the off state for this scene. When I activate the scene, the device should turn off. Sometimes it does, but sometimes it doesn’t. If the device is already in the OFF state, activating the scene does nothing. If the device is in the ON state, activating the scene behaves as expected. This is a problem because even though HASS thinks the device is OFF, in practice the device could actually physically be on. I would like it to send the OFF command even if HASS thinks it is already off.

A polite and humble “bump”, if you please. I could really use some help on this.