Closed GGW42 closed 2 years ago
Hi All, I am back from Holidays now and I was hoping for someones comment on this but I guess everyone else is on holidays too. I looked at this again on my return and discovered my mistake.
I had omitted the ":null" parameter on the "Money Maker" entities. Once the ":null" with this it seems to work OK but I can't really tell till we get some period of zero pence power, it has been is a long time since we have seen one of those.
moneymakers:
- input_boolean.boiler: null
timers:
- day_from: today
day_to: tomorrow
entity_id: input_boolean.boiler
I don't suppose anyone knows why the ":null" is needed there and nowhere else? Are there any other options than null? If so can someone please tell me the syntax of the other options?
@GGW42 sorry for the delay, you can either have null or just leave the ":" on it's own. I have the later in my config:
moneymakers:
- input_boolean.hot_water_on:
A note for when I have more time. This is caused by this line The config is expected to be a dict by default to allow extra params to be set. Need to change this so that it checks if the config is a dict or str.
OK, Thanks for your help, makes sense now.
Describe the bug I have been using your "home-assistant_OctopusAgile" custom integration successfully for over 6 months now (I am running the latest version) and have just been writing a Home Assistant Automation to enable me to disable the boiler when I go away in a few weeks (my first break in 18 months thanks to Covid19 restrictions). To do this I had to stop "home-assistant_OctopusAgile" from controlling the boiler switch directly, and control it via an "input. boolean" & an automation instead.
At first I though I could leave the Moneymaker set to the
switch.boiler
, since I didn't mind heating the water if I was being paid to do so :-) but found that doing so would turn off theswitch.boiler
as soon as my automation turned it on viainput_boolean.boiler
, mostly anyway, it depended on which one occurred first which is Logical enough with hind site.So I then turned the moneymaker into an "input. boolean" as well, but since doing so the
timers
would not update and give this as part of the error message in the LOGSFile "/config/custom_components/octopusagile/__init__.py", line 192, in handle_update_timers moneymaker = next(iter(moneymaker_dict.items())) AttributeError: 'str' object has no attribute 'items'
So I have now commented out the money makers completely to allow my "home-assistant_OctopusAgile" to run correctly with my
input_boolean
and Automation in place and my "AWAY" condition simply stops automation from turning theswitch.boiler
on when activated.My code with a commented out lines for the alternate version of the boiler switch.
moneymakers:
- switch.boiler
#- input_boolean.boiler
timers:
- day_from: today
day_to: tomorrow
#entity_id: switch.boiler
entity_id: input_boolean.boiler
To Reproduce Change the
moneymakers:
to be aninput_boolean
as shown above.Expected behavior I expected the
input_boolean
to behave the same way as aswitch
Desktop (please complete the following information):
Hopefully someone can tell me what I am doing wrong if this turns out to be "Just Me". Thanks for the code and your time, it is getting better all the time.