Lovelace: Simple thermostat card

Thanks. Just check my code and it’s all right but lovelace cannot find the file for some reason.

can you give an example of sending an object for the icon field? doesn’t seem to work for me, but maybe I’m not sending a valid object.

Like this @jusdwy

icon:
    heat: mdi:radiator-disabled
    idle: mdi:radiator

Any idea why it is sometimes not loading? I see some errors in the log:

I believe the addon is broken right now. Seems to call a resource from the web, and looks like most other custom-ui addons cal it locally from Lovelace now. Look at the animated weather widget that is at the top of the forums right now. Looks like it was just fixed with the same issue.

I would love to use your card except it doesn’t work on Fire Tablets, anyway you can compile your source through babel, this will allow setting the type to js instead of module thus allowing this to work on FireTablets. Since they have an old web view. Kalkih fixed it in his plugin Lovelace: Mini Media Player, maybe you can ask him how he got it to work.

@scfigg @madrian Update to the latest version of simple-thermostat in Github. There was a CDN issue with a hosted JS library (Polymer/lit-element) that is now bundled into HA. The new version uses the bundled library and fixes the loading error.

Thanks essel, it’s working now. After update an empty cache was needed in the browser.

Thanks. I didn’t’ see that it was updated. I updated tot he latest version and had to clear my cache, but it’s working now. Thanks!

Oh, so the option to set the icon as a string just sets a static icon in the header?

The documentation isn’t super clear on that. Sending an object suggests to me that I can include an entity and it’ll use its current icon.

I’m in the process of moving things behind a build step to also produce a build that supports older JS engines @skynet01 . I have limited time to spend on this so thats why everything takes some time :smiley:

How do I clear the iOS app cache? I managed to make it work in my desktop’s chrome but it is stil broken in my ios devices!

What exactly do you mean broken? What is the error message? What iOS version are you on? Which version of home assistant do you have running?

@myle, would you care to share your config?
I find your screenshot very beautiful.

I pulled this just now to try and use with the Tado climate component and get an error thrown in Chrome

Uncaught (in promise) TypeError: html is not a function
    at HTMLElement.renderInfoItem (simple-thermostat.js?v=1:426)
    at HTMLElement.render (simple-thermostat.js?v=1:285)
    at HTMLElement.update (ba7ed9f3515f27cc7b5a.chunk.js:169)
    at HTMLElement._validate (ba7ed9f3515f27cc7b5a.chunk.js:145)
    at HTMLElement._invalidate (ba7ed9f3515f27cc7b5a.chunk.js:145)

The card is rendered as an empty element.

My ui config.

- type: custom:simple-thermostat
  entity: climate.heating
  step_size: 1
  sensors:
    - entity: sensor.heating_temperature

Am I using it correctly?

I’m getting the following error in my logs, I updated to the latest simple-thermostat.js a couple of days ago:

2019-01-19 12:15:52 ERROR (MainThread) [frontend.js.latest.201901091] http://haven:8123/local/resources/cards/simple-thermostat.js:499:1 ReferenceError: SimpleThermos is not defined

My config looks like this:

climate:
  - platform: generic_thermostat
    name: Fireplace
    heater: switch.fireplace_2
    target_sensor: sensor.fireplace_temp

It seems my problem was a copy/paste error, changed SimpleThermo to SimpleThermostat in the last line of simple-thermostat.js, no error message any more.

hi,

Great work!
In my case I have air conditioners that are controlled with Sensibo Sky.
In that sense I need an on/off switch, so I did a minor modification to your code in order to include it:

I will probably be adding the fan speed that is also missing.

I believe both are useful for air conditioner users.

Thoughts ?

Thanks
Claudio.

2 Likes

Can you share your configuration for Nest ?

Hi, i can i add vertical vane, fan mode speed?