Lovelace: Simple thermostat card

Hi, thanks! But i don’t have sensor.melcloud_thermostat_humidity (in my case and for example).
Where i get it?

Would you mind sharing the code. I’d like to use that switch for away mode with nest.

Thank you very much for this card.
I am no fan of lovelace at all, but this makes it a lot more useful for me.

Sure, I added the following toggle in renderHeader() method:

  renderHeader() {
if (this.name === false) return ''

let icon = this.icon
const { state } = this.entity

if (typeof this.icon === 'object') {
  icon = state in this.icon ? this.icon[state] : false
}

return html`
  <header>
    ${
      (icon &&
        html`
          <ha-icon class="icon" .icon=${icon}></ha-icon>
        `) ||
        ''
    }
    <h2 class="title">${this.name}</h2>
    <ha-entity-toggle style="margin-left: auto;" .hass="${this._hass}" .stateObj="${this.entity}"></ha-entity-toggle>
</header>
` }

you will need then to do a yarn bulid to get the simple-thermostat.min.js

Is it possible to set the fan speed at all?

I think, I have overestimated my abilities. :slight_smile:
Thank you anyway.

hi,
i have sensibo.
how do i add fan speed and on/off?

I really like what you have done with this card. I prefer it so much more than the standard lovelace thermostat card. The only thing I miss from the standard lovelace thermostat card is the ability to turn on and off using a button rather than a drop down box. Is there anyway you could add the functionally to show/hide the various state that specific thermostat component has (which still being able to show/hide the mode drop down box).

I just upgraded to the latest version. I have to say, wow. I like where this is going. I used to add lots of other info with glance cards, now I don’t have to.
I don’t know how others feel about it, but I think there should be more space between the down arrow and mode switches.

Dear Nervetattoo: it possible to change to icon to e.g. flame which turns red when the state is “heat” and say green when the state is "idle’ and grey when it’s ‘off’? in other words can the icon to be used in the various states and the color of the icon be made input options as opposed to the fixed icons with one color?

1 Like

by the way I love the card and use it for 11 thermostats!

I can’t get this one to work with Mill heaters.
It works great with a basic switch though.

Command needed to change temperature:
{“room_name”: “Soverom”, “away_temp”: “19”}
Soverom is the room name obviously, the second can be away_temp, comfort_temp or sleep_temp
It works as it should when I call a service.

I’ve done some coding but never JSON so I have no idea where to begin

@nervetattoo
I like the new design with the buttons, but would it be possible to exclude some heat modes with a filter? E.g. I have two modes that I dont need. This are “Manufacturer specific” & “Full Power”. The card is really big with this two modes.

Also, I can’t find a way to add an icon to “Heat Eco”
I tried the following but that didn’t work:

Eco: ‘mdi:leaf’

When mwc-button-s are used for possible modes list, mode–active doesn’t work. So it’s impossible to distinguish active mode button for inactive ones.

Anyone has some clue how to change “Off” word on the button from black to white color and also how to add white frames on buttons? I have not found via css. Thanks for advice.
Untitled

1 Like

Thanks for all the feedback and kind words on this card folks, its really motivating to read! I’m not overly active on this forum so I’m grateful when you step in and help out your fellow HA hackers :slight_smile:

I know there have been a lot of thoughts around how modes should work and be possible to configure/tweak so I wanted to ask if anyone have concrete input on the changes to this handling that I’m planning. Please read the writeup in the github issue and ideally comment there if you have an account:

Hi, maybe you can help a newbie, I have my HA running in a virtual box, all the config files are at /config/ and the custom controls should go at /config/custom_components so created a subfolder there and copied the javascript file and a dummy init.py file too

I can’t find the right path to put in the configuration.yaml

tried many ways, all failed with error: Configuration invalid CHECK CONFIG Component not found: resources

this is what I entered:

resources:
  - url: /config/custom_components/termocustom/simple-thermostat.js
    type: module

Thanks

Lovelace custom cards don’t belong in the custom components folder. They need to be accessible by the web-based frontend, so they go into the {config dir}/www folder (or a subdirectory of it). See the manual installation directions here: https://github.com/nervetattoo/simple-thermostat#installation-manual

Lovelace custom cards are different than Home Assistant Custom Components. Conceptually, Lovelace content is the frontend (like a content you see on a webpage) and components are the backend (database, server, etc.).

I’m using this card to control my heated floors. The temperature that’s displayed is showing as “70.0” instead of just “70”. I’d like to get rid of the unnecessary “.0”. Is it possible to format the number to just a whole number?

Not at the moment. I live in a metric world so a decimal number always made sense to me. I realise now that for fahrenheit you might be better off without it. I guess if step size gets set to 1 we can opt in for pure integer formatting. Will keep that in mind, or you can add an issue at github if you have an account.