nervetattoo / simple-thermostat

A different take on the thermostat card for Home Assistant ♨️
MIT License
739 stars 110 forks source link

Allow support for water heater via control section (modes) #167

Open fireheadman opened 3 years ago

fireheadman commented 3 years ago

I see that the 'control' section allows for HVAC, Presets, Fan, and Swing would it be possible to include modes for water heaters? Unsure if it would be name 'operations_list' ?

Example (Rheem EcoNet water heater)

image

and here is a HVAC system (Rheem EcoNet furnace)

image
fireheadman commented 3 years ago

Per the screenshots and the usage of 'controls' in simple-thermostat, is hvac the same as hvac_modes AND fan the same as fan_modes (from the attributes of an entity)?

so 'operation_list' would become 'operation' ? Or does the '_list' mess this up?

fireheadman commented 3 years ago

update: was able to workaround this using buttons, but would be great to have this card recognize and offer presets/controls for buttons (automagically) as the HVAC shows them

image

``` - type: divider - type: horizontal-stack cards: - type: button icon: 'mdi:leaf' icon_height: 20px name: Eco tap_action: action: call-service service: water_heater.set_operation_mode service_data: entity_id: water_heater.hydra operation_mode: eco - type: button icon: 'mdi:radiator' icon_height: 20px name: Heat Pump tap_action: action: call-service service: water_heater.set_operation_mode service_data: entity_id: water_heater.hydra operation_mode: heat_pump - type: button icon: 'mdi:thermometer-lines' icon_height: 20px name: High Demand tap_action: action: call-service service: water_heater.set_operation_mode service_data: entity_id: water_heater.hydra operation_mode: high_demand - type: button icon: 'mdi:flash-outline' icon_height: 20px name: Electric tap_action: action: call-service service: water_heater.set_operation_mode service_data: entity_id: water_heater.hydra operation_mode: electric - type: button icon: 'mdi:stop-circle-outline' icon_height: 20px name: 'Off' tap_action: action: call-service service: water_heater.set_operation_mode service_data: entity_id: water_heater.hydra operation_mode: 'off' - type: divider ```
mstarks01 commented 2 years ago

Hey @fireheadman your card looks great. Unfortunately, I've run into issues integrating it. Is this a button card? I've tried custom, entity, entities and button cards, but i'm doing something wrong when trying to work your config in. Of course I've changed the entity ID as well. Can you please post the entire YAML?

fireheadman commented 2 years ago
type: custom:vertical-stack-in-card
cards:
  - type: custom:simple-thermostat
    entity: water_heater.hydra
    step_size: 1
    header: false
    //header: null
    //  name: ''
    //  icon: mdi:thermometer
    decimals: 0
    service:
      domain: water_heater
      service: set_temperature
    hide:
      temperature: true
    sensors:
      - entity: water_heater.hydra
        name: Current Mode
        attribute: operation_mode
      - entity: water_heater.hydra
        name: Water Temp Setpoint
        attribute: temperature
      - entity: sensor.hydra_power_usage_today
        name: Energy Used (kWh)
        //attribute: power_usage_today
      - entity: sensor.hydra_tank_health
        name: Tank Health (%)
        //attribute: tank_health
      - entity: sensor.hydra_compressor_health
        name: Compressor Health (%)
        //attribute: hot_water_availability
  - type: divider
  - type: horizontal-stack
    cards:
      - type: button
        icon: mdi:leaf
        icon_height: 20px
        name: Eco
        tap_action:
          action: call-service
          service: water_heater.set_operation_mode
          service_data:
            entity_id: water_heater.hydra
            operation_mode: eco
      - type: button
        icon: mdi:radiator
        icon_height: 20px
        name: Heat Pump
        tap_action:
          action: call-service
          service: water_heater.set_operation_mode
          service_data:
            entity_id: water_heater.hydra
            operation_mode: heat_pump
      - type: button
        icon: mdi:thermometer-lines
        icon_height: 20px
        name: High Demand
        tap_action:
          action: call-service
          service: water_heater.set_operation_mode
          service_data:
            entity_id: water_heater.hydra
            operation_mode: high_demand
      - type: button
        icon: mdi:flash-outline
        icon_height: 20px
        name: Electric
        tap_action:
          action: call-service
          service: water_heater.set_operation_mode
          service_data:
            entity_id: water_heater.hydra
            operation_mode: electric
      - type: button
        icon: mdi:stop-circle-outline
        icon_height: 20px
        name: 'Off'
        tap_action:
          action: call-service
          service: water_heater.set_operation_mode
          service_data:
            entity_id: water_heater.hydra
            operation_mode: 'off'
  - type: divider
  - type: horizontal-stack
    cards:
      - type: custom:mini-graph-card
        entities:
          - entity: sensor.hydra_power_usage_today
            name: Energy Used
            color: orange
        show:
          icon_adaptive_color: true
          extrema: true
        hours_to_show: 48
        points_per_hour: 1
        animate: true
        //height: 150
        //lower_bound: 0
        //upper_bound: 8
        unit: kWh
      - type: custom:mini-graph-card
        entities:
          - entity: sensor.hydra_available_hot_water
            name: Hot Water Availability
            color: red
        show:
          icon_adaptive_color: true
          extrema: true
        hours_to_show: 48
        points_per_hour: 1
        animate: true
        //height: 150
        //lower_bound: 0
        //upper_bound: 120
        unit: '%'
fireheadman commented 2 years ago

that gives this...

image
mstarks01 commented 2 years ago

Outstanding. Almost there. You have a few sensors I don't have; namely, tank health, compressor health and total hot water availability. Are those perhaps because of a different model or did you do something custom with a template sensor?

fireheadman commented 2 years ago

this sounds like maybe your integration needs some tuning or you are not using the same ProTerra model?

Here is my integration image

image

mstarks01 commented 2 years ago

I enabled debug and my unit doesn't have some of the features yours done. Bummer, but I bet "hot water availability" is nothing more than a calculation. For now, I've just removed the parts that aren't supported for me.

I appreciate your help.

fireheadman commented 2 years ago

you could create the missing sensors..... there is also a econet discord that may be able to assist, they are pretty active over there making the econet integration nicer
https://discord.com/invite/5nd2wJr