New electric water heater / boiler (integrated with HA)

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 :confused:

1 Like

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 %}

Found the issue:
https://github.com/home-assistant/core/issues/94190

1 Like

Was hoping on that :slight_smile:

The fix is changing icon_template into icon

1 Like
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 :slight_smile:

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 ?

1 Like

Not now, will, try to get it later at home :frowning:

Sure No problem :slight_smile:
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 :frowning:

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 :slight_smile:

{"sum":"93",

Not sure what “sum” refers to here :frowning:

192.168.8.233 shows this:


https://v4.mytesy.com/old/calculator-statistics/2000-v1/2000-c8eea614f796
shows this:

and the nearest to power is 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 :slight_smile: should be no harm in completing it? Its not in any language I can read.

Hmm, then this data should also be locally available :slight_smile: just need to find the right URL



No, this is not the setup, but the local control. The setup is completed 5 or 6 yrs ago :slight_smile: , can’t rememeber when I`ve get the boiler, I think it was 2018 or earlier.

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 :frowning:

have a look here:

he is using:
value_template: "{{ ((states('sensor.boiler_power') | float / 3600000) * 2400) | round(2) }}

with the sum

1 Like