Page 1 of 1

Feature Request DummyDevices

Posted: 15 Apr 2020 00:43
by ridewithstyle
Hello there,

If this is the wrong place to ask for this, please remove my post.

I play quite a lot with dummy devices and I miss the following types

binary sensor (yes, you can use the switch but that is somewhat limiting and can be accidentally switched)
thermostat (as the multlevel-switch can only increment in integer values and can't set e.g. 20.5)

In case it's not too much work, that would be great, thanks.

Best regards,
rws

Re: Feature Request DummyDevices

Posted: 15 Apr 2020 04:41
by PoltoS
CodeDevice is what you need

Re: Feature Request DummyDevices

Posted: 15 Apr 2020 19:04
by ridewithstyle
almost. I already looked at that, but the codedevice expects to poll something to aquire a value, the dummy on the other hand does not.

If I set my code device binary sensor to "off" and want to push the value from a script or e.g. the mqtt plugin, that doesn't work.

Regarding the code device for multilevel switch, I can't emulate a Thermostat with that, it doesn't get me further than the dummy device for multilevel switch, so no benefit here as well.

Re: Feature Request DummyDevices

Posted: 27 Apr 2020 03:34
by PoltoS
If you set polling time to 0, then no polling code will be executed. And then you can use vDev.set("metrics:level", XXX) to set the value explicitly

Re: Feature Request DummyDevices

Posted: 27 Apr 2020 18:01
by ridewithstyle
Thanks but the MQTT Plugin doesn't seem to do this, I tried exactly what you suggested prior to giving feedback. I would have to program my very own MQTT listener. Sounds a bit challenging for now, I try to look into it