Unfortunately, the
switch:
- platform: command_line
switches:
tesyboostonoff:
will be deprecated as of 2023.8, there is a new syntax for this here:
Unfortunately, the
switch:
- platform: command_line
switches:
tesyboostonoff:
will be deprecated as of 2023.8, there is a new syntax for this here:
As far as I am understanding it should become something like this:
command_line:
- switch:
name: tesyboostonoff
unique_id: djfhsfkjsfjkhdsfjkdshfsdkjfhsdkfjhdsfkjhsdfskjdhfsdkjhfsd
command_on: "/usr/bin/curl -X GET http://192.168.2.254/boostSW?mode=1&_=1634911445424"
command_off: "/usr/bin/curl -X GET http://192.168.2.254/boostSW?mode=0&_=1634911446795"
command_state: "/usr/bin/curl -sX GET http://192.168.2.254/status?_=1634912123253"
value_template: "{{ value_json['boost'] == '1' }}"
icon_template: >
{% if value_json['boost'] == '0' %} mdi:rocket
{% elif value_json['boost'] == '1' %} mdi:rocket-launch
{% else %} mdi:help-circle
{% endif %}
But it gave me errors on icon_template
Same error here, I can`t find the mistake in the code:
command_line:
- switch:
name: Boost Tesy! #tesyboostonoff
command_on: "/usr/bin/curl -X GET http://192.168.8.233/boostSW?mode=1&_=1634911445424"
command_off: "/usr/bin/curl -X GET http://192.168.8.233/boostSW?mode=0&_=1634911446795"
command_state: "/usr/bin/curl -sX GET http://192.168.8.233/status?_=1634912123253"
value_template: >
{{ value_json['boost'] == '1' }}
icon_template: >
{% if value_json['boost'] == '0' %} mdi:rocket
{% elif value_json['boost'] == '1' %} mdi:rocket-launch
{% else %} mdi:help-circle
{% endif %}
- switch:
name: Tesy power switch! #tesyonoff
command_on: "/usr/bin/curl -X GET http://192.168.8.233/power?val=on&_=1664015398260"
command_off: "/usr/bin/curl -X GET http://192.168.8.233/power?val=off&_=1664015398260"
command_state: "/usr/bin/curl -sX GET http://192.168.8.233/status?_=1634912123253"
value_template: >
{{ value_json['power_sw'] == 'on' }}
icon_template: >
{% if value_json['power_sw'] == "on" %} mdi:toggle-switch
{% else %} mdi:toggle-switch-off
{% endif %}
Was hoping on that
The fix is changing icon_template
into icon
command_line:
- switch:
name: tesyboostonoff
unique_id: tesy_boost_on_off
command_on: "/usr/bin/curl -X GET http://192.168.2.254/boostSW?mode=1&_=1634911445424"
command_off: "/usr/bin/curl -X GET http://192.168.2.254/boostSW?mode=0&_=1634911446795"
command_state: "/usr/bin/curl -sX GET http://192.168.2.254/status?_=1634912123253"
value_template: "{{ value_json['boost'] == '1' }}"
icon: >
{% if value_json['boost'] == '0' %} mdi:rocket
{% elif value_json['boost'] == '1' %} mdi:rocket-launch
{% else %} mdi:help-circle
{% endif %}
- switch:
name: tesyonoff
unique_id: tesy_on_off
command_on: "/usr/bin/curl -X GET http://192.168.2.254/power?val=on&_=1664015398260"
command_off: "/usr/bin/curl -X GET http://192.168.2.254/power?val=off&_=1664015398260"
command_state: "/usr/bin/curl -sX GET http://192.168.2.254/status?_=1634912123253"
value_template: "{{ value_json['power_sw'] == 'on' }}"
icon: >
{% if value_json['power_sw'] == "on" %} mdi:toggle-switch
{% else %} mdi:toggle-switch-off
{% endif %}
- switch:
name: tesyresetpower
unique_id: tesy_reset_power
command_on: "/usr/bin/curl -X GET http://192.168.2.254/resetPow?_=1634912213060"
- switch:
name: tesysetsetmanualmode
unique_id: tesy_set_manual_mode
command_on: "/usr/bin/curl -X GET http://192.168.2.254/modeSW?mode=1&_=1664177920325"
# Set a default schedule here if you dont want manual mode any longer
command_off: "/usr/bin/curl -X GET http://192.168.2.254/modeSW?mode=2&_=1664177920325"
command_state: "/usr/bin/curl -sX GET http://192.168.2.254/status?_=1634912123253"
value_template: "{{ value_json['mode'] == '1' }}"
icon: >
{% if value_json['mode'] == '1' %} mdi:water-boiler
{% elif value_json['mode'] == '2' %} mdi:calendar
{% elif value_json['mode'] == '3' %} mdi:calendar
{% elif value_json['mode'] == '4' %} mdi:calendar
{% elif value_json['mode'] == '5' %} mdi:sprout
{% elif value_json['mode'] == '6' %} mdi:sprout
{% elif value_json['mode'] == '7' %} mdi:sprout
# No idea what mode 8 is.
{% elif value_json['mode'] == '8' %} mdi:help
{% elif value_json['mode'] == '9' %} mdi:beach
{% else %} mdi:help-circle
{% endif %}
For any one who is interested
I had to update my automations as my logs in HA were getting quite long:
- id: '1666601755141'
alias: Z-Tesy Temperature input automatically changed
description: ''
trigger:
- platform: state
entity_id: sensor.tesyboilertargettemp
condition: []
action:
- service: input_number.set_value
target:
entity_id: input_number.tesyboilermanualtempinput
data:
value: '{{states(''sensor.tesyboilerwatertargettemp'')|float}}'
mode: single
- id: '1666601767258'
alias: Z-Tesy Temperature input manually changed
description: ''
trigger:
- platform: state
entity_id: input_number.tesyboilermanualtempinput
condition: []
action:
- service: rest_command.tsmt
data:
temperature: '{{ states(''input_number.tesyboilermanualtempinput'') | int }}'
Also current dashboard if any one is interested:
I`ve never managed to get any results for power consumption… Any ideas why?
Not on the top of my head, can you show me the JSON you are getting from the boiler ?
Not now, will, try to get it later at home
Sure No problem
ill check back in later then!
Damn, http://192.168.8.233/api?name=all always leads to appliance.lan error page.
http://192.168.8.233/calcRes?=1634912123253 outputs
{"sum":"93","resetDate":"2023-06-08 18:57:22","volume":"80","watt":"2400"}
Yeah there are so many different firmwares in the open for these devices its not funny, and there is no upgrade available anywhere
You should go to http://192.168.8.233 and check the inspect page of your browser (f12?) on the page where the KWH is displayed there should be the right link available example:
There should be a URL that you can use in there somewhere
{"sum":"93",
Not sure what “sum” refers to here
192.168.8.233 shows this:
{"HourNow":17,"2000-c8eea614f796":{"ThisYear":2035366,"LastMonth":2400691,"ThisMonth":57446,"Yesterday":7893,"Today":10588,"Last24h":{"23":750,"22":0,"21":0,"20":0,"19":0,"18":0,"17":0,"16":2,"15":0,"14":0,"13":0,"12":0,"11":0,"10":0,"9":0,"8":2206,"7":4170,"6":4139,"5":4170,"4":570,"3":0,"2":0,"1":0,"0":0},"Last12M":{"12":57446,"11":272796,"10":231748,"9":247916,"8":235611,"7":164260,"6":126237,"5":102191,"4":124323,"3":141634,"2":139300,"1":130426}}}
Looks like the setup process should be no harm in completing it? Its not in any language I can read.
Hmm, then this data should also be locally available just need to find the right URL
Ah oke, And if you look on the inspect page there while you click around there is no secret json that contains the KWH ?
No, there is no word about power or else, just passwords etc
have a look here:
he is using:
value_template: "{{ ((states('sensor.boiler_power') | float / 3600000) * 2400) | round(2) }}
with the sum