Lovelace: Simple thermostat card

Can some bright person translate the card-modder tweaking as per the simple-thermostat card into the new car-mod? I have tried but failed miserably.

type: ‘custom:card-modder’
style:
–st-font-size-xl: 24px
–st-font-size-m: 20px
–st-font-size-title: 20px
–st-font-size-sensors: 30px
–st-spacing: 2px
card:
type: ‘custom:simple-thermostat’

Any idea why I’m getting this when I have the plugin installed from the HACS store?

image

Are u adding the lines to Resources?

Yes, this:

- type: module
  url: /community_plugin/simple-thermostat/simple-thermostat.js
  - url: /community_plugin/simple-thermostat/simple-thermostat.js
    type: module

Got my syntax right now and it does show:

image

How can I remove the Preset row at the bottom?

@sd_dracula

1 Like

That actually get’s rid of the Operation row also which is not what I want, just the Presets one

Feel free to share the code with me in a private message here if that suits you better :slight_smile:

So, since I couldn’t sleep last night and my dumb boiler doesn’t really offer any preset modes, I made this. The idea is to hide the existing preset modes and use these custom instead.
As of now it’s just a few radio-like buttons writting an input_text but I’m posting it anyway.

The boost button is supposed to start a 15-min timer that bypasses the other presets. I wanted to maybe display an animated bar with the remaining time but I came to realize that the timer component does not work as intended. The conditional entity card is just a placeholder.

Could someone point me to the best approach for this moving forward? Should I use scenes for the different modes? For example, after the boost timer ends, I’d like to return to the previous state/mode. I’m thinking scenes. Edit: nervetattoo has already answered this before, it’s scenes.

(I tried the ‘vertical-stack-in-card’ custom component to merge the two cards but it seems a little buggy. I think I’ll just use the vertical-stack card.
I got the idea for this from one of the examples on https://github.com/custom-cards/button-card#examples)



configuration.yaml:

input_text:
  clima_mode:
    initial: custom

timer:
  clima_boost:
    duration: 00:15:00

lovelace:

cards:
  - cards:
      - color: '#dff4fd'
        color_type: card
        entity: input_text.clima_mode
        icon: 'mdi:account-outline'
        name: Custom
        state:
          - color: '#03a9f4'
            styles:
              icon:
                - color: white
              name:
                - color: white
            value: custom
        styles:
          card:
            - height: 60px
            - border-radius: 4px
            - color: '#03a9f4'
          name:
            - font-size: 14px
            - padding-bottom: 3px
        tap_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.clima_mode
            value: custom
        type: 'custom:button-card'
      - color: '#dff4fd'
        color_type: card
        entity: input_text.clima_mode
        icon: 'mdi:home-outline'
        name: Home
        state:
          - color: '#03a9f4'
            styles:
              icon:
                - color: white
              name:
                - color: white
            value: home
        styles:
          card:
            - height: 60px
            - border-radius: 4px
            - color: '#03a9f4'
          name:
            - font-size: 14px
            - padding-bottom: 3px
        tap_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.clima_mode
            value: home
        type: 'custom:button-card'
      - color: '#dff4fd'
        color_type: card
        entity: input_text.clima_mode
        icon: 'mdi:sleep'
        name: Night
        state:
          - color: '#03a9f4'
            styles:
              icon:
                - color: white
              name:
                - color: white
            value: night
        styles:
          card:
            - height: 60px
            - border-radius: 4px
            - color: '#03a9f4'
          name:
            - font-size: 14px
            - padding-bottom: 3px
        tap_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.clima_mode
            value: night
        type: 'custom:button-card'
      - color: '#dff4fd'
        color_type: card
        entity: input_text.clima_mode
        icon: 'mdi:briefcase-outline'
        name: Work
        state:
          - color: '#03a9f4'
            styles:
              icon:
                - color: white
              name:
                - color: white
            value: work
        styles:
          card:
            - height: 60px
            - border-radius: 4px
            - color: '#03a9f4'
          name:
            - font-size: 14px
            - padding-bottom: 3px
        tap_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.clima_mode
            value: work
        type: 'custom:button-card'
      - color: '#dff4fd'
        color_type: card
        entity: input_text.clima_mode
        icon: 'mdi:map-marker-off'
        name: Away
        state:
          - color: '#03a9f4'
            styles:
              icon:
                - color: white
              name:
                - color: white
            value: away
        styles:
          card:
            - height: 60px
            - border-radius: 4px
            - color: '#03a9f4'
          name:
            - font-size: 14px
            - padding-bottom: 3px
        tap_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.clima_mode
            value: away
        type: 'custom:button-card'
    type: horizontal-stack
  - color: '#dff4fd'
    color_type: card
    entity: input_text.clima_mode
    name: BOOST
    show_icon: false
    state:
      - color: '#ED6A5A'
        styles:
          card:
            - color: white
        value: boost
    styles:
      card:
        - border-radius: 4px
        - font-size: 20px
        - font-weight: bold
        - color: '#03a9f4'
    tap_action:
      action: call-service
      service: input_text.set_value
      service_data:
        entity_id: input_text.clima_mode
        value: boost
    type: 'custom:button-card'
  - card:
      entities:
        - timer.clima_boost
      type: entities
    conditions:
      - entity: input_text.clima_mode
        state: boost
    type: conditional
type: vertical-stack

automations.yaml:

- id: '1577604511877'
  alias: climate_boost_mode_enable
  description: ''
  trigger:
  - entity_id: input_text.clima_mode
    platform: state
    to: boost
  condition: []
  action:
  - entity_id: timer.clima_boost
    service: timer.start
- id: '1577604781130'
  alias: climate_boost_mode_disable
  description: ''
  trigger:
  - entity_id: input_text.clima_mode
    from: boost
    platform: state
  condition: []
  action:
  - entity_id: timer.clima_boost
    service: timer.cancel
- id: '1577605106260'
  alias: climate_boost_timer_finished
  description: Back to custom. SHOULD BE BACK TO PREVIOUS MODE!!!
  trigger:
  - event_data:
      entity_id: timer.clima_boost
    event_type: timer.finished
    platform: event
  condition: []
  action:
  - data:
      value: custom
    entity_id: input_text.clima_mode
    service: input_text.set_value
2 Likes

Hi @nervetattoo

By changing label for the sensor and the units, there’s a fair enough hygrostat card working with dry function of a split AC and the fan_only with a smart plug connected to a humidifier (haven’t found a way of changing labels for dry/fan_only to humidify/dehumidify as these are tied up with the climate component and also the likes of ATTR_TARGET_TEMP_HIGH/LOW/STEP for humidity are currently lacking in order to set for a proper hygrostat component similar to HVAC).

image

Wondering if it would be too difficult to set it as a dual purpose card for temp&hum (the backend component still shows units in °C but this is not a big problem)

2 Likes

Hi… first of all, its a great card. Thanks for that.
i know that you are not into different colors and stuff, but i would be great if the functionality could be added. Like the standard card, where the Heat symbol gets a orange color on the icon when heating. For the Sensors (humidity etc), also a color following some schema…
for now as a workaround, i am using the vertical-stack to add the sensors with colors from the custom_ui. Still have to improve it, but helps for now… but it would be great if your card could have this function (like the original one) or a integration with the custom_ui.

Hi all,
is it possible to increase the size or change the layout only of current temperature value?

Thanks

Didn’t see a reply to thermseekr’s post. Has anyone found a way to remove the word “Operation” from the card so that it just leaves the modes spread out to fill the bottom of the card?

I got a question.
How did you get the language or name different for the “Temperature” —> “Temperatuur”
and also for the “State” -----> “Mode”

Would love to also make that a different language or name.

These are both documented here: This is now documented here GitHub - nervetattoo/simple-thermostat: A different take on the thermostat card for Home Assistant ♨️

1 Like

I have the same issue. Are you able to share your automation with me to get this to work? Thanks.

For both translations I did have used two template sensors which I configured.
The default tempature and state sensor in Simple Thermostate I hide using the hide label in the configuration.

With the latest update from nervetattoo (great work btw) you can use the label configuration for Temperature and change the text into something else as mentioned by nervetattoo.

For the state I am still using a template sensor. The component seems to use the hvac state values for my Nest thermostat and not the operation states. I fixed that for myself using a template sensor.

My config (in ui-lovelace.yaml):

          - type: 'custom:simple-thermostat'
            entity: climate.living_room
            name: false
            decimals: 1
            icon:
              - off: None
              - heat: None
            step_size: 0.5
            label:
              temperature: Temperatuur
            hide:
              state: true
            control:
              _names bool: true
              _icons: true
              hvac:
                "heat":
                  name: Verwarmen
                  icon: mdi:fire
                "off":
                  name: Uit
                  icon: mdi:power
              preset:
                "none":
                  name: Geen
                  icon: mdi:power
                "away":
                  name: Afwezig
                  icon: mdi:clock-alert-outline
                "eco":
                  name: Eco
                  icon: mdi:leaf
                "Away and Eco":
                  name: Afwezig en Eco
                  icon: mdi:leaf
            sensors:
              - entity: sensor.living_room_thermostat_operation_mode_dutch
                name: Mode
              - entity: sensor.living_room_thermostat_humidity
                name: Vochtigheid
            style: |
              ha-card {
                --sidebar-selected-icon-color: #a2a7a6;
                --st-spacing: 4px;
                --st-mode-active-background: rgba(255, 255, 240, 0.2);
                --st-mode-active-color: #a2a7a6;
                --st-mode-background: rgba(255, 255, 240, 0.05);
              }

My template sensor (under configuration.yaml - sensor:):

# Living Room Thermostat Mode
- platform: template
  sensors:
    living_room_thermostat_operation_mode_dutch:
      friendly_name: 'Mode'
      value_template: >
        {% if is_state("sensor.living_room_thermostat_operation_mode", "off") %}
          Uit
        {% elif is_state("sensor.living_room_thermostat_operation_mode", "heat") %}
          Verwarmen
        {% elif is_state("sensor.living_room_thermostat_operation_mode", "eco") %}
          Eco
        {% else %}
          Onbekend
        {% endif %}
1 Like

Any ideas on how I can hide this?

This have changed in newest HA, at least for Z-Wave thermostats, that when OFF the target temperature is N/A.

I solved it this way:

control:
  - hvac
  - preset: false
entity: climate.eurotronic_eur_spiritz_wall_radiator_thermostat_mode_3
fallback: 'OFF'

So replacing N/A with OFF. Just the °C remained but I can live with that :slight_smile: