dinmammas / homebridge-tibberswitch

Allows you to do automation based on the current electricity price
9 stars 1 forks source link

TIbberswitch does not trigger on set prices #4

Closed napthemax closed 1 year ago

napthemax commented 1 year ago

If I choose "Below average every day" it works fine, but not on Normal, Cheap and Very Cheap. See my settings and triggers from Homebridge:

Settings in tibberswitch (threshold 2 is cheap): "name": "Tibberswitch torpet", "token": "nnnn", "threshold": "2", "accessory": "HomebridgeTibberswitch", "plugin_map": { "plugin_name": "homebridge-tibberswitch"

Result in Homebridge: 2023-07-12 07:00:05Tibberswitch BridgeTibberswitch torpetCurrent price level rating: CHEAP 2023-07-12 07:00:05Tibberswitch BridgeTibberswitch torpetCurrent electricity price is 85 cents. 2023-07-12 07:00:05Tibberswitch BridgeTibberswitch torpetPrice is over your desired threshold.

Bug or something I missed?

dinmammas commented 1 year ago

Looks like your threshold config setting is a string, it's supposed to be an int. "threshold": 2

What's happening is that it then defaults to 0. Try it out and report back. :)

napthemax commented 1 year ago

Ok, trying it out. Did the config in HOOBS (in the standard interface, not the advanced) and it seems like HOOBS added the string {"2"}. So a bug then, but maybe in HOOBS. ;-)

dinmammas commented 1 year ago

@napthemax Anything to report back?

napthemax commented 1 year ago

@napthemax Anything to report back?

Yes. Manual edit of settings did the trick (i.e. edit the json directly). Doing the guided setting in Hoobs/Homebridge results in "threshold": "1",

dinmammas commented 1 year ago

Thanks, great! I've never used HOOBS so probably never gonna do anything 'extra' to support it. Homebridge UI (and manual json config) is what I aim to support.