-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensors #56
Comments
Hi @lewiscf77, do you have any errors in the home assistant log file that might help narrow it down? Are you seeing any of the octopusagile entities? A formatted version of your config for the component would be useful too (Minus your account details) |
Hi Mark,
Thanks for the reply. Sorry I think the sensors were complete user error. 🙁
I think I have everything now setup correctly but for some reason I can't get it to trigger the switches. The timers are created but never triggered.
I love the integration guess i'm to daft to use it 🙂👎
Idea being the tesla charge switch is triggered to run for 5 hours at the lowest pricing.
Craig
octopusagile:
region_code: "H"
mpan: Secret
serial: Secret
auth: sk_live_Secret
startdate: "2020-05-08"
moneymakers:
- switch.teslacharge: null
- switch.office_heater: null
timers:
- day_from: today
day_to: tomorrow
entity_id: switch.teslacharge
numHrs: 5
params: null
block: false
requirements:
- day_from: today
day_to: tomorrow
numHrs: 1
time_from: '19:00:00'
time_to: '06:00:00'
- day_from: tomorrow
day_to: tomorrow
numHrs: 1
time_from: '10:00:00'
time_to: '16:00:00'
time_from: '19:00:00'
time_to: '19:00:00'
run_devices:
- energy_time: 2
entity_id: switch.office_heater
run_before: '08:00:00'
run_time: 2
…________________________________
From: Mark Gardner <[email protected]>
Sent: 05 February 2021 19:33
To: markgdev/home-assistant_OctopusAgile <[email protected]>
Cc: lewiscf77 <[email protected]>; Mention <[email protected]>
Subject: Re: [markgdev/home-assistant_OctopusAgile] Sensors (#56)
Hi @lewiscf77<https://github.com/lewiscf77>, do you have any errors in the home assistant log file that might help narrow it down? Are you seeing any of the octopusagile entities? A formatted version of your config for the component would be useful too (Minus your account details)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASMJCVYI66EBCMPCBRDPCM3S5RBXRANCNFSM4XE2D7QQ>.
|
Hi @lewiscf77, |
Hi @lewiscf77 I think your error is in the < run_devices: > section because it doesn't seem to work if you put an actual device entity in there,
Replacing the
So perhaps I need to replace the second '.' with an '_' in the switch name? Not sure, but I haven't yet successfully got an actual switch to work there. The timers section originally had the opposite problem in that the @markgdev FYI. The timers did get updated and looked like they should work but all failed last night, just as well the weather is warmer then last week :)
OK that's my view and I probably got a lot wrong but that's how it seems to work for me. As a test just comment out that run device and I suspect your car will start charging. Mark, feel free to point out any mistakes i have made, i am still learning HA and all the stuff that goes with it. |
Hi,
Yes I think it was user error in the end.. Many thanks to Mark for pointing me in the right direction 🙂
In the end I couldn't use the integration fully, as it kept switching off the device, when not in the time window. I was trying to use it to charge the car whilst at home using the car manufactures api. Which then stopped the car from charging away from home.
I need to invest in a different switching device that I can use this to control.
Craig
…________________________________
From: GGW42 <[email protected]>
Sent: 22 February 2021 18:55
To: markgdev/home-assistant_OctopusAgile <[email protected]>
Cc: lewiscf77 <[email protected]>; Mention <[email protected]>
Subject: Re: [markgdev/home-assistant_OctopusAgile] Sensors (#56)
Hi @lewiscf77<https://github.com/lewiscf77>
I was just wondering if you got this working?
I did a 24hour test of my setup because I was fairly sure I saw an error in you configuration, as I had done a similar thing myself before and wanted to remind myself of what happened at that time.
I think your error is in the < run_devices: > section because it doesn't seem to work if you put an actual device entity in there,
by way of example I have this device for my washing machine, under run_devices:
- energy_time: 0.5 entity_id: washing_machine run_before: '08:00:00' run_time: 0.5
The above YAML creates an entity called 'octopusagile.washing_machine' I then use an Automation to control the actual switch.
Replacing the entity_id: washing_machine with an actual switch (in my case 'switch.sinotimer_switch' that I use for testing) seems to stop both the timer & run device from working, nothing ever happens.
Mark may know why, I have no clue but the logs do say this:-
Logger: custom_components.OctopusAgile Source: custom_components/OctopusAgile/__init__.py:355 Integration: OctopusAgile First occurred: 21 February 2021, 15:30:05 (53 occurrences) Last logged: 17:30:04 Invalid entity id encountered: octopusagile.switch.sinotimer_switch. Format should be <domain>.<object_id>
So perhaps I need to replace the second '.' with an '_' in the switch name? Not sure, but I haven't yet successfully got an actual switch to work there.
The timers section originally had the opposite problem in that the entity had to be a switch but mark changed that some months ago to allow 'input_boolean' instead of a switch and I use that for a second timer to trigger an Automation.
@markgdev<https://github.com/markgdev> FYI. The timers did get updated and looked like they should work but all failed last night, just as well the weather is warmer then last week :)
`timers:
* entity_id: switch.boiler_disabled_enabled
times:
'2021-02-21T22:30:00Z':
params: null
rate: 9.261
'2021-02-22T04:30:00Z':
params: null
rate: 9.639
'2021-02-22T14:00:00Z':
params: null
rate: 9.702
'2021-02-22T14:30:00Z':
params: null
rate: 8.925
'2021-02-22T15:00:00Z':
params: null
rate: 9.702`
OK that's my view and I probably got a lot wrong but that's how it seems to work for me.
As a test just comment out that run device and I suspect your car will start charging.
Mark, feel free to point out any mistakes i have made, i am still learning HA and all the stuff that goes with it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASMJCV3BBFAYB4LTCZ3A6B3TAKSBNANCNFSM4XE2D7QQ>.
|
Craig, you could just set a block time by changing the Block option to true, it will then allow find the cheapest block of hours (depending on your needs) and keep it switched on for that period each time.
This works quite well. |
Hi,
I now have this working pretty much as I want and it's awesome. Using the timers to call a hook switch that I use the state within node red to call a flow.
This probably the correct place for this (being a newby I apologise if it's not)! Is it possilbe to change how "money makers" work. I'd like to set a low value say <4p to switch on, not just when it's negative. I've tried to find how to do it myself but with no joy.
Craig
…________________________________
From: GGW42 <[email protected]>
Sent: 23 February 2021 18:07
To: markgdev/home-assistant_OctopusAgile <[email protected]>
Cc: lewiscf77 <[email protected]>; Mention <[email protected]>
Subject: Re: [markgdev/home-assistant_OctopusAgile] Sensors (#56)
Craig, you could just set a block time by changing the Block option to true, it will then allow find the cheapest block of hours (depending on your needs) and keep it switched on for that period each time.
Shown in my example below is 2 x 3hour blocks.
block: true #(Optional, note that if requirements are set, the block times will be taken from there.)
requirements:
- day_from: today
day_to: tomorrow
numHrs: 3
time_from: '19:00:00'
time_to: '09:00:00'
- day_from: tomorrow
day_to: tomorrow
numHrs: 3
time_from: '10:00:00'
time_to: '16:00:00'
This works quite well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASMJCV3BTD6XLDY5PFGPDRDTAPVERANCNFSM4XE2D7QQ>.
|
Recently my HASS setup was updated, and your code no longer seems to work, I had to reinstall HACS and I reinstalled your code for Agile, yet I'm not able to get anything working. specifically the "current price". I've gone back through and checked everything - obviously I put my account details into the configuration.yaml. Is there something missing from the configuration - I'm wondering if there is something missing in the documentation and example config code - as it mentions: "sensor Yet there isn't an example of this, only a sample configuration yaml with at the end a single entry of:
|
I've updated HA today and tried to see if I could get the same issue but haven't been able to replicate. Did it sort itself out in the end? If you see it again, try running octopusagile.update_timers and then wait for the half hour to tick over and hopefully you'll be good to go. If not throw any errors you have in your log on here and I'll take a look. |
@lewiscf77 Sounds feasible to me, I'm not sure I'll get time anytime soon though but if you want to give it a go. I think a copy of the moneymakers section would work and change the 0 on this line to 4. |
I just installed and get exactly the same thing, I can't get price info!
|
Oh no, I lied! I just needed to be more patient and wait for the values to load after a half hour tick around! Sorted! |
Describe the bug
Hi sorry if this is wrong place, I'm new to HA and am trying to get this working to charge the car.
I may have configured this incorrectly but I can't see how to configure the sensors.
In the readme it ends here.
sensor:
platform: "octopusagile"
To Reproduce
My config.yaml.
run_devices:
energy_time: 2.5
entity_id: switch.office_heater
run_before: '08:00:00'
sensor:
platform: "octopusagile"
Expected behavior
Sensors show in HA
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: