Dennis wrote: Hello Dario,
I suppose it is possible, but I've no BMP080 or BMP180 here to test.
edit - but I think when it needs two pins, then we can only connect BMP sensor and nothing else with ESP-01 modules. And esp is very power-hungry, I had a node running on 9V block with regulator set to 3,3v, it lasted only one day...
If I update position, then event to send value is triggered again - this is why sometimes it goes in loop. So I've removed position update. I don't know better method to disable event when value is updated.
The "update" event is triggered by graphical change of wheel position? What about triggering separate "graphical update" event for wheel, when sensor value changes, without triggering another update event for value change?
So that you've got two events: one for "real" change in module's values (initiated by user or automation; which also triggers graphical change event), the other just for the graphical change of wheel position (triggers *no* other event)?
ATM the numeric dimmer value works just like this I think, even with new js script you provided, it is visually updated properly on all clients when changed. Without loop.
edit - or you need to somehow differenciate between "wheel changed by user interaction" and "wheel changed by graphical update mechanism" to get wheel position updates to work properly?
edit2 - or what about detaching the "value changed" event handler while updating the wheel position, and re-enable the event handler afterwards? Something like here: stackoverflow.com/questions/744494/winfo...ble-an-event-handler