finally got something to share that I think is easy enough for people to implement.
What does it do? It turns the tv off during periods of time (Mon-Fri, Sat,Sun)
so first up what you need
a controllable tv - I use a sony bravia with the new addon from @frenck (A god among mortals).
node red - again I use the addon.
you need an input select.
here is the one I used for this (keep it like this as the “auto” is used to reset the BIGTIMER)
input_select:
tv_automation:
name: TV Automation
options:
- auto
- manual
initial: auto
icon: mdi:TV
lovelace ui for my wife to do it
- type: entities title: Tv Automation show_header_toggle: false entities: - input_select.tv_automation
and the node red flow is
`
[{“id”:“884d445d.f124b8”,“type”:“bigtimer”,“z”:“153946d3.c174b9”,“outtopic”:“”,“outpayload1”:“”,“outpayload2”:“”,“name”:“Big Timer TV”,“comment”:“”,“lat”:“XXX”,“lon”:“XXX”,“starttime”:“450”,“endtime”:“495”,“starttime2”:“1170”,“endtime2”:“1425”,“startoff”:0,“endoff”:0,“offs”:0,“outtext1”:“ON”,“outtext2”:“OFF”,“timeout”:1440,“sun”:false,“mon”:true,“tue”:true,“wed”:true,“thu”:true,“fri”:true,“sat”:false,“jan”:true,“feb”:true,“mar”:true,“apr”:true,“may”:true,“jun”:true,“jul”:true,“aug”:true,“sep”:true,“oct”:true,“nov”:true,“dec”:true,“day1”:0,“month1”:0,“day2”:0,“month2”:0,“day3”:0,“month3”:0,“day4”:0,“month4”:0,“day5”:0,“month5”:0,“day6”:0,“month6”:0,“d1”:0,“w1”:0,“d2”:0,“w2”:0,“d3”:0,“w3”:0,“d4”:0,“w4”:0,“d5”:0,“w5”:0,“d6”:0,“w6”:0,“xday1”:0,“xmonth1”:0,“xday2”:0,“xmonth2”:0,“xday3”:0,“xmonth3”:0,“xday4”:0,“xmonth4”:0,“xday5”:0,“xmonth5”:0,“xday6”:0,“xmonth6”:0,“xd1”:0,“xw1”:0,“xd2”:0,“xw2”:0,“xd3”:0,“xw3”:0,“xd4”:0,“xw4”:0,“xd5”:0,“xw5”:0,“xd6”:0,“xw6”:0,“suspend”:false,“random”:false,“repeat”:true,“atstart”:true,“odd”:false,“even”:false,“x”:330,“y”:40,“wires”:[,[“4fc23627.d3d488”,“b554751a.1484f8”],]},{“id”:“4fc23627.d3d488”,“type”:“debug”,“z”:“153946d3.c174b9”,“name”:“”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“x”:650,“y”:40,“wires”:},{“id”:“b554751a.1484f8”,“type”:“bravia-ircc”,“z”:“153946d3.c174b9”,“tv”:“8d055253.49eab”,“ircc”:“PowerOff”,“name”:“”,“x”:530,“y”:120,“wires”:},{“id”:“94226684.ae0028”,“type”:“bigtimer”,“z”:“153946d3.c174b9”,“outtopic”:“”,“outpayload1”:“”,“outpayload2”:“”,“name”:“Big Timer”,“comment”:“”,“lat”:“XXX”,“lon”:“XXX”,“starttime”:“360”,“endtime”:“480”,“starttime2”:“1170”,“endtime2”:“1425”,“startoff”:0,“endoff”:0,“offs”:0,“outtext1”:“ON”,“outtext2”:“OFF”,“timeout”:1440,“sun”:true,“mon”:false,“tue”:false,“wed”:false,“thu”:false,“fri”:false,“sat”:true,“jan”:true,“feb”:true,“mar”:true,“apr”:true,“may”:true,“jun”:true,“jul”:true,“aug”:true,“sep”:true,“oct”:true,“nov”:true,“dec”:true,“day1”:0,“month1”:0,“day2”:0,“month2”:0,“day3”:0,“month3”:0,“day4”:0,“month4”:0,“day5”:0,“month5”:0,“day6”:0,“month6”:0,“d1”:0,“w1”:0,“d2”:0,“w2”:0,“d3”:0,“w3”:0,“d4”:0,“w4”:0,“d5”:0,“w5”:0,“d6”:0,“w6”:0,“xday1”:0,“xmonth1”:0,“xday2”:0,“xmonth2”:0,“xday3”:0,“xmonth3”:0,“xday4”:0,“xmonth4”:0,“xday5”:0,“xmonth5”:0,“xday6”:0,“xmonth6”:0,“xd1”:0,“xw1”:0,“xd2”:0,“xw2”:0,“xd3”:0,“xw3”:0,“xd4”:0,“xw4”:0,“xd5”:0,“xw5”:0,“xd6”:0,“xw6”:0,“suspend”:false,“random”:false,“repeat”:true,“atstart”:true,“odd”:false,“even”:false,“x”:320,“y”:160,“wires”:[,[“549d80db.c6aaa”,“b554751a.1484f8”],]},{“id”:“549d80db.c6aaa”,“type”:“debug”,“z”:“153946d3.c174b9”,“name”:“”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“x”:650,“y”:180,“wires”:},{“id”:“35777d8e.532712”,“type”:“server-state-changed”,“z”:“153946d3.c174b9”,“name”:“TV Automated”,“server”:“8c80cfdd.e8389”,“entityidfilter”:“input_select.tv_automation”,“entityidfiltertype”:“exact”,“outputinitially”:false,“state_type”:“str”,“haltifstate”:“”,“halt_if_type”:“”,“halt_if_compare”:“is”,“outputs”:1,“output_only_on_state_change”:true,“x”:90,“y”:80,“wires”:[[“884d445d.f124b8”,“94226684.ae0028”,“1f1aea42.e96366”]],“outputLabels”:[“auto”,“off”],“icon”:“node-red-contrib-bravia/tv.png”},{“id”:“1f1aea42.e96366”,“type”:“debug”,“z”:“153946d3.c174b9”,“name”:“”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“x”:220,“y”:380,“wires”:},{“id”:“8d055253.49eab”,“type”:“bravia-tv”,“z”:“”,“name”:“SonyTV”,“host”:“10.0.1.33”,“port”:“80”,“psk”:“0000”},{“id”:“8c80cfdd.e8389”,“type”:“server”,“z”:“”,“name”:“Home Assistant”}]
`