I’m a quite a newbe, but looking for making a sensor that has 2 states (low and high). I should work with the Dutch laag tarief and hoog tarief for electric power.
I want to use it in automations to let high powerusers run only (or mostly) at the lower cost laag tarief
It depends a bit on where you live exactly, but roughly its every day from 23:00 till 6:00 next morning and the complete weekend.
Would be nice to have the icon to show what state its in.
is what it is over here, so check if it truly is 6 in your location.
the above is a template sensor, so you should precede it with:
sensor:
- platform: template
sensors:
depending on your config, this would be either in you configuration.yaml, but more likely in a dedicated folder for sensors, or even a package.
As long as you reference the sensor: in your configuration.yaml, and point it to the correct location.
If you have a ‘slimme-meter’, it should be able to provide you the current tariff-type. If you haven’t @Mariusthvdb suggestion looks like a neat alternative.
thank you a lot for all your help.
But I think I need al little more help with this.
Should I put everything somewhere in configuration.yalm or should I put it somewhere else ?
Securety wise, setup a Duck.dns, but not using it jet. at this moment only possible to reach from within the home network (at least that is what I think
sure, but all components you install are communicating also. better be safe than sorry.
Especially when you start using rooted devices… Not sure what that means, but it sounds as if one has been fiddling with it.
Duckdns is a great tool/service, and is one of the tools freely available to the community. Browse the other topics here to find all the info and help you need
at first sight that might look alright, but it only holds if you don’t have solar panels producing power. In which case states.sensor.toon_p1_power_use_high might very well be < 0 while at high tariff.
Time is the only true determinator here.
don’t want to ‘know better’ but you could write your sensor like: