@riemers, @genivos My Apologies for the late response, had much work and I just noticed the notifications here.
Here is the yaml for the visual elements that are presented several posts above.
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: ''
alignment: center
subtitle: Tesy Water Heater
- type: conditional
conditions:
- entity: sensor.tesy_error
state_not: '00'
card:
type: markdown
content: |-
**ERROR**
There was an error recorder in the Tesy Rest command response.
Please Review!
- type: custom:mushroom-template-card
primary: |-
Status: {% if is_state('sensor.tesy_heating', '0') %}
Idle
{% else %}
Heating
{% endif %}
secondary: >-
{% if is_state('sensor.tesy_time_left_to_requested_temperature', '0') %}
Desired Temperature Reached.
{% else %}
Time To Reach Desired Temperature : {{
states('sensor.tesy_time_left_to_requested_temperature') }} Minutes.
{% endif %}
icon: |-
{% if is_state('sensor.tesy_heating', '0') %}
mdi:sleep
{% else %}
mdi:heat-wave
{% endif %}
entity: sensor.tesy_heating
icon_color: |-
{% if is_state('sensor.tesy_heating', '0') %}
green
{% else %}
red
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
- type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: switch.tesyonoff
layout: vertical
name: Power
tap_action:
action: toggle
- type: custom:mushroom-entity-card
entity: switch.tesyboostonoff
layout: vertical
name: Boost
tap_action:
action: toggle
- type: custom:mushroom-title-card
title: ''
subtitle: Temperature
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: ''
secondary: ''
icon: mdi:numeric-0
badge_icon: mdi:shower-head
icon_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpT', '0') %}
green
{% endif %}
layout: vertical
tap_action:
action: call-service
service: script.tesy_set_zero_shower
data: {}
target: {}
badge_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpC', '0') %}
amber
{% endif %}
- type: custom:mushroom-template-card
primary: ''
secondary: ''
icon: mdi:numeric-1
badge_icon: mdi:shower-head
icon_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpT', '1') %}
green
{% endif %}
tap_action:
action: call-service
service: script.tesy_set_one_shower
data: {}
target: {}
layout: vertical
badge_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpC', '1') %}
amber
{% endif %}
- type: custom:mushroom-template-card
primary: ''
secondary: ''
icon: mdi:numeric-2
badge_icon: mdi:shower-head
icon_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpT', '2') %}
green
{% endif %}
tap_action:
action: call-service
service: script.tesy_set_two_shower
data: {}
target: {}
layout: vertical
badge_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpC', '2') %}
amber
{% endif %}
- type: custom:mushroom-template-card
primary: ''
secondary: ''
icon: mdi:numeric-3
badge_icon: mdi:shower-head
icon_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpT', '3') %}
green
{% endif %}
tap_action:
action: call-service
service: script.tesy_set_three_shower
data: {}
target: {}
layout: vertical
badge_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpC', '3') %}
amber
{% endif %}
- type: custom:mushroom-template-card
primary: ''
secondary: ''
icon: mdi:numeric-4
badge_icon: mdi:shower-head
icon_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpT', '4') %}
green
{% endif %}
tap_action:
action: call-service
service: script.tesy_set_four_shower
data: {}
target: {}
layout: vertical
badge_color: |-
{% if is_state_attr('sensor.tesy_water_heater', 'tmpC', '4') %}
amber
{% endif %}
- type: custom:mini-graph-card
hours_to_show: 24
points_per_hour: 1
update_interval: 30
name: Hot Water For
line_width: 1
smoothing: false
tap_action: none
animate: true
hour24: true
lower_bound: 0
upper_bound: 4
entities:
- entity: sensor.tesy_current_temperature
name: Current Shower Count
color: orange
- entity: sensor.tesy_target_temperature
name: Target Shower Count
color: green
show:
graph: line
name: true
legend: true
icon: false
labels: false
labels_secondary: false
This is the example script, note that I am refreshing all the rest commands in it.
alias: Tesy Set Four Shower
sequence:
- service: switch.toggle
data: {}
target:
entity_id: switch.tesy_set_four_temp
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: rest.reload
data: {}
mode: single
icon: mdi:shower-head
Also this is the sensor code in the config.yaml
### TESY CONFIGURATION ###
rest:
- authentication: basic
scan_interval: 300
resource: http://192.168.50.45/api?name=_all
sensor:
- name: "Tesy Water Heater"
icon: mdi:water-boiler
unique_id: "TesyWaterHeater"
value_template: "OK"
json_attributes:
- "prfl"
- "tmpMX"
- "tmpT"
- "tmpR"
- "tmpC"
- "bst"
- "pwr"
- "err"
- "mode"
- "ht"
- "cdt"
template:
- sensor:
- name: "Tesy Mode"
icon: mdi:calendar
unique_id: "TesyMode"
state: "{{ state_attr('sensor.tesy_water_heater', 'mode') }}"
- sensor:
- name: "Tesy Error"
icon: mdi:water-boiler-alert
unique_id: "TesyError"
state: "{{ state_attr('sensor.tesy_water_heater', 'err') }}"
- sensor:
- name: "Tesy Boost Status"
icon: mdi:lightning-bolt
unique_id: "TesyBoostStatus"
state: "{{ state_attr('sensor.tesy_water_heater', 'bst') }}"
- sensor:
- name: "Tesy Power Status"
icon: mdi:power
unique_id: "TesyPowerStatus"
state: "{{ state_attr('sensor.tesy_water_heater', 'pwr') }}"
- sensor:
- name: "Tesy Target Temperature"
icon: mdi:shower-head
unique_id: "TesyTargetTemperature"
state: "{{ state_attr('sensor.tesy_water_heater', 'tmpT') }}"
unit_of_measurement: "Shower"
- sensor:
- name: "Tesy Current Temperature"
icon: mdi:shower-head
unique_id: "TesyCurrentTemperature"
state: "{{ state_attr('sensor.tesy_water_heater', 'tmpC') }}"
unit_of_measurement: "Shower"
- sensor:
- name: "Tesy Refferent Temperature"
icon: mdi:shower-head
unique_id: "TesyRefferentTemperature"
state: "{{ state_attr('sensor.tesy_water_heater', 'tmpR') }}"
unit_of_measurement: "Shower"
- sensor:
- name: "Tesy Max Temperature"
icon: mdi:shower-head
unique_id: "TesyMaxTemperature"
state: "{{ state_attr('sensor.tesy_water_heater', 'tmpMX') }}"
unit_of_measurement: "Shower"
- sensor:
- name: "Tesy Heating"
icon: mdi:heat-wave
unique_id: "TesyHeating"
state: "{{ state_attr('sensor.tesy_water_heater', 'ht') }}"
- sensor:
- name: "Tesy Time Left To Requested Temperature"
icon: mdi:clock
unique_id: "TesyTimeToRequestTemp"
state: "{{ state_attr('sensor.tesy_water_heater', 'cdt') }}"
switch:
- platform: command_line
switches:
tesyboostonoff:
command_on: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=bst&set=1'"
command_off: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=bst&set=0'"
command_state: "/usr/bin/curl -sX GET 'http://192.168.50.45/api?name=_all'"
value_template: "{{ value_json['bst'] == '1' }}"
friendly_name: Tesy Boost Switch
icon_template: >
{% if value_json['bst'] == '0' %} mdi:rocket
{% elif value_json['bst'] == '1' %} mdi:rocket-launch
{% else %} mdi:help-circle
{% endif %}
tesyonoff:
command_on: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=pwr&set=1'"
command_off: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=pwr&set=0'"
command_state: "/usr/bin/curl -sX GET 'http://192.168.50.45/api?name=_all'"
value_template: "{{ value_json['pwr'] == '1' }}"
friendly_name: Tesy Power Switch
icon_template: >
{% if value_json['pwr'] == "1" %} mdi:toggle-switch
{% else %} mdi:toggle-switch-off
{% endif %}
tesy_set_zero_temp:
command_on: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=0'"
command_off: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=0'"
friendly_name: Tesy Set Zero
icon_template: mdi:shower-head
tesy_set_one_temp:
command_on: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=1'"
command_off: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=1'"
friendly_name: Tesy Set One
icon_template: mdi:shower-head
tesy_set_two_temp:
command_on: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=2'"
command_off: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=2'"
friendly_name: Tesy Set Two
icon_template: mdi:shower-head
tesy_set_three_temp:
command_on: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=3'"
command_off: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=3'"
friendly_name: Tesy Set Three
icon_template: mdi:shower-head
tesy_set_four_temp:
command_on: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=4'"
command_off: "/usr/bin/curl -X GET 'http://192.168.50.45/api?name=tmpT&set=4'"
friendly_name: Tesy Set Four
icon_template: mdi:shower-head
### TESY CONFIGURATION END ###
That’s basically it. It has been working like this past 2 months, I haven’t changed anything since then.
Again sorry for the delayed answer, I’ll try to be more present for further questions now.