Lovelace: Thermostat card (BETA)


#42

Me too… Hope to have those added asap


#43

Great work! Thanks for this.

Question: Mine always is orange even if it is ‘not doing work’ (eg when setpoint=actual temp). Would expect it to go eg black when it is not doing work and only orange when when the burner is on. Or is there a setting for this?


#44

Hi, great work.
Is there any way to override default thermostat colors in our custom theme actually ?


#45

Hi i need use a fisic thermostat, ecobee, nest, etc or i cant my sensor ds18b20
Thanks


#46

Wh not using standard lovelace climate card? works well for me so far.


#47

Probably because it didn’t exist till very recently.


#48

Because it didn’t exist until 4 days ago.


#49

I see :wink: bit now it works well :wink:


#50

wonder if this will be continued because of the official one.
I like the integrated one but its quite basic and only allows me to turn my thermostat on or off but it has a 4 more options available…
I really like all the options this custom thermostat would bring in the future…


#51

How to have the hvac working when using tado thermostat? Actually i can only turn on/off the thermostat…


#52

Anybody else getting the same as me? I’ve had a goose around and can only see this in the logs:

http://awwyisss:1234/local/custom_ui/thermostat-card.lib.js?v=1:7:0 SyntaxError: expected expression, got ‘<’


#53

I have a heat pump controlled by IR commands. Currently it’s backed by some various input_boolean and input_select elements, but I am really liking what I’m seeing with this Thermostat card. I am very interested in seeing a ‘template’ version of it so that I can back the card with my input variables and have a nice pretty control for my heat pump.

That dial would also be awesome for a media volume control. It’s already what the Google Home app shows for a volume control.


#54

You might have the directory names wrong, check that you used - or _ in the names and check what you put in the resource url.


#55

So been playing around with the new lovelace ui and have got the thermostat working. Looks great! but I cannot seem to set it below 12C is there something I am missing?


#56

i) If the only learned IR commands are for on and off then you can use the generic thermostat (set it in configuration.yaml) and in Lovelace you can use either stock or custom thermostat card.

For the on/off heater part I think it can also be a input_boolean, not necessarily a switch, as in the default config (I have set as switch my relay on an ESP8266 that controls the heater): https://www.home-assistant.io/components/climate.generic_thermostat/#heater

ii) If using more IR commands (also temperature, fan, swing, etc) you can set it up as a MQTT HVAC (my example below is for a split AC with 8 buttons IR remote; pretty much standard these days). Then set for each topic used by the MQTT a sensor that will be used as trigger by the automation (I’ve added both for operation and for off). The action part of the automation calls a script that is named accordingly to the state target. My scripts (I’ve learned all IR commands for all buttons combinations thus there are aprox. 200 different scripts; this is totally unnecessary and I will clean it up to no more 10 commands) are further calling MQTT commands. I’m using raw IR (when I’ve set the component the IR remote was not recognized so I had to use raw signals) but service can be used with any commercial product such as Broadlink RM which is easier to use. Either way, you can use the Lovelace thermostat card.

#Scripts
    hallhvacoff:
      alias: off
      sequence:
        - service: mqtt.publish
          data:
            topic: "home/GatewayOpenMQTT1/commands/IR_Raw"
            payload: "" #payload is removed (IR Raw is 900+ char)
    hallhvaconnoautofalsecool16:
      alias: onnoautoFALSEcool16
      sequence:
        - service: mqtt.publish
          data:
            topic: "home/GatewayOpenMQTT1/commands/IR_Raw"
            payload: ""
    hallhvaconnoautofalsecool17:
      alias: onnoautoFALSEcool17
      sequence:
        - service: mqtt.publish
          data:
            topic: "home/GatewayOpenMQTT1/commands/IR_Raw"
            payload: ""

#HVAC component
    - platform: mqtt
      name: HVAC hall
      modes:
        - dry
        - cool
        - fan
      swing_modes:
        - yes
        - no
      fan_modes:
        - auto
        - high
        - medium
        - low
      hold:
        - yes
        - no
      power_command_topic: "hvac/hall/power/set"
      mode_command_topic: "hvac/hall/mode/set"
      temperature_command_topic: "hvac/hall/temperature/set"
      fan_mode_command_topic: "hvac/hall/fan/set"
      swing_mode_command_topic: "hvac/hall/swing/set"
      hold_command_topic: "hvac/hall/swing/set"
      current_temperature_topic: "hvac/hall/state/temperature"
      payload_on: "on"
      payload_off: "off"
      retain: true
      initial: 22
#Automations
    - alias: 'HVAC hall operation'
      initial_state: 'on'
      trigger:
        - platform: state
          entity_id:
            - sensor.hvac_hall_mode
            - sensor.hvac_hall_temperature
            - sensor.hvac_hall_fan
            - sensor.hvac_hall_swing
      action:
        - service: homeassistant.turn_on
          data_template:
            entity_id: script.hallhvac{{states.sensor.hvac_hall_power.state|replace("ON","on")|replace("OFF","off")}}{{states.sensor.hvac_hall_sleep.state}}{{states.sensor.hvac_hall_fan.state}}{{states.sensor.hvac_hall_swing.state|replace("False","false")|replace("True","true")}}{{states.sensor.hvac_hall_mode.state}}{{states.sensor.hvac_hall_temperature.state|replace(".0","")}}
    - alias: 'HVAC hall off'
      initial_state: 'on'
      trigger:
        - platform: state
          entity_id: sensor.hvac_hall_power
          to: "off"
      action:
        - service: homeassistant.turn_on
          entity_id: script.hallhvacoff

#57

I just upgraded to .82 and started getting this error in my logs.

/local/thermostat-card.js:10:38 Uncaught TypeError: Cannot read property ‘attributes’ of undefined

Is anyone else seeing this after upgrading?


#58

Something happened to my nest authorization after upgrading. I had to remove it and re-configure and it is now working.


#59

My heat pump is 100% IR commands. I have it set up right now with an input boolean for power, an input_select for mode (Dry, Heat, Cool, Fan), and an input_number for temperature. There are automations to control when I change one of those controls and send the appropriate IR command. I just thought it would be nice to use the proper thermostat control.

I haven’t bothered with commands like swing or fan mode. The remote for my device is kind of weird because it sends the entire state of the unit (temperature, mode, everything) with every button press. It was a bit of a pain in the ass to set up because it meant I had to have individual IR commands for (Heat & Temp20, Heat & Temp21, Heat & Temp22, Cool & Temp20, Cool & Temp21, etc.).

I haven’t bothered to attempt to reverse engineer how the IR commands are structured to do any better, and Lennox seems to be very secretive about how this works (I tried to get the information via their support channels).


#60

AC units have the same MO, as the IR message includes the full state (also temperature). Due to large number of manufacturers and used protocols, it is unlikely to find discrete commands unless someone else has already recorded and analysed individual IR payloads from remote presses. Anyway, IR Raw format can be used without any support from the manufacturer.

As mentioned, with generic thermostat you need one toggling device (input_boolean/switch) with on and off commands. The thermostat will use the target temp +/- tolerance (either cold or heat) to set an interval for which the on command will be active For example if setting target temp to 23 C (metric system :slight_smile: ), cold tolerance to 0.5 and mode to cold, the pump will start working if current temp is at 23.5 C or above then shutdown at 22.5 C based on the min cycle duration. If temperature is below 22.5 C it won’t start (case the thermostat is set as cold).

Haven’t used the away_temp but my understanding is that target_temp should be reset after turning off the away mode as the away temp becomes the new target (so that thermostat won’t start).

You can set two different generic thermostats: one for cool that uses off and Cool&Temp20 commands for the switch/input_boolean and the other with off and Heat&Temp22, for example. An automation would be needed to set the cooling thermostat to off during November - April and the heater to off for the remainder of the year (or the other way around case living in Southern part of the world) in order not to send both type of commands to the pump during the same cycle.

Also, I think a filter can be used in Lovelace to show only the active thermostat so that only one placeholder will be used at any time.

Otherwise, you can keep all the current commands and use MQTT HVAC with more control over the MQTT topics.

In regard of features top notch thermostats physical units like Nest or EcoBee have additionally, these can be easily set into HA at a fraction of the cost: scheduling based on working day (set an automation that turns the thermostat on with 1/2 of hour before wake-up time and off at 1/2 after leaving to work/school during the week and on another schedule at evening; then keep it to on during the weekend, etc.), open window alarm (needs an additional open window sensor and cheapest ones are 433 Mhz that are used for burglar alarm), anti-freezing (so that the thermostat starts itself even if turned to off case the temperature is dropping significantly based on a forecast temperature sensor like Dark Sky), self-learning & setting away mode (using Bayesian binary sensor that watches a couple of PIR motion sensors and device trackers; sufficient granularity can be achieved if wifi, BLE device trackers can identify a person if home/away and set operation mode based on individual’s preferences).


#61

Hi, can I use the card just to show a temperature? Like the temperature sensor I have in my pool?