Disable Slider on new Thermostat Card (or make read-only)

Hi

I’m probably in the minority in that I preferred the old Thermostat card (!). On the old card when my automation to ‘Boost’ my Hive heating fired, the Thermostat card clearly said ‘Boost’. This is no longer the case.

Also, is there a way to completely disable the slider? When scrolling controls on a phone it is extremely easy to change the temp by accident. Basically I am looking for the card to be a visual read-only representation of what’s going on with my heating because my heating is controlled via automations and I never need to adjust it manually.

Thanks for any info.

1 Like

Try card-mod to disable “pointer-event”.
You will need to learn css.

I also agree that the slider is too easy to accidentally change. I think two things could make it better:

  • Require that you grab the “ball” of the slider to move it, instead of being able to click anywhere along the slider to instantly move it there. This probably solves 95% of the problem.

  • Enabling a lock feature which can be turned on (via the UI), where if you change the slider you get a popup confirmation box to accept, before the actual change is applied. Like Tap Action → Confirmation: Actions - Home Assistant This currently doesn’t seem to exist for the Thermostat card.

5 Likes

I agree too. I currently find the new thermostat card unusable on a phone when trying to scroll past it. Instead I use the tile card to display my climate entities until this gets fixed one day (hopefully).

3 Likes

It is possible to disable the thermostat slider using card-mod, check out my post on the card-mod thread:

Looks like a very good workaround (until this is permanently addressed).
Unfortunately it doesn’t work for me on 2024.1

My screenshots are from 2024.1.0. The thermostat card is inside of a vertical stack, not sure whether that plays a factor.

Interesting, since I have basically the same:

type: vertical-stack
cards:
  - entity: climate.livingroom_thermostat
    name: Woonkamer
    theme: default
    type: thermostat
    card_mod:
      style:
        .: |
          .more-info {
            width: 0;
          }
        ha-state-control-climate-temperature$:
          ha-control-circular-slider$: |
            g#interaction {
              display: none;
            }
  - entity: climate.upstairs_thermostat
    name: Boven
    theme: default
    type: thermostat
    style: |
      ha-card {
        background: rgba(67, 73, 82, 0.3) ;
      }
    card_mod:
      style:
        .: |
          .more-info {
            width: 0;
          }
        ha-state-control-climate-temperature$:
          ha-control-circular-slider$: |
            g#interaction {
              display: none;
            }

1 Like

This was already covered in another post Lovelace: Lockable toggles - avoid accidental triggering

I got this to semi work only because I just wanted a visual on my main dashboard where the voltage was, and the actual slider is on a hidden dashboard, which suits me perfectly.

  - type: custom:hui-entities-card
    title: Battery Cut-Off
    entities:
      - card:
          entity: input_number.wattmeter_1_batt_volt_set
          name: Volt
        row: true
        type: custom:restriction-card
        restrictions:
          confirm:
            exemptions:
              - user: Admin
          pin:
            code: 1234
            exemptions:
              - user: Admin
          block:
            exemptions:
              - user: Admin
        exemptions:
          - user: Admin
        round: 2
#        full_row: true
#        show_icon: false
#        state_color: true

So, basically, even though I included the user and passcode, it never unlocked for me (Possibly just too dense to figure it out :confused: ) but as I said, this worked to my advantage, as I did not really want to be able to change it from the visible dashboard anyway :slight_smile:

Edit: Just added the “action: hold” function to the code (same indentation as the “round” function) and removed all the restrictions and users etc, and now it can be locked/unlocked, although, I reverted back to the original as it made more sense for my situation.

Just add the GitHub - iantrich/restriction-card: 🔒 Apply restrictions to Lovelace cards to hacs and it is rather self explanatory from there.

Ps. I also couldn’t get the “Full Row” thing to work either, but I guess that’s because I was trying to use another cards settings :person_shrugging:

Just an update on this lock feature to maybe help someone out (Figured it out a while back but forgot there was a topic created for it), as it took me way longer to find the solution than I care to admit.

My final code I have that works very well on the dashboard side:

  - type: custom:hui-entities-card
    title: Battery Settings (Home Assistant)
    entities:
      - card:
          entity: input_number.wattmeter_1_batt_volt_min
          name: Voltage (Lower Limit)
        row: true
        type: custom:restriction-card
        action: hold
        restrictions:
          confirm:
            exemptions:
              - user: Someone Else
          pin:
            text: Enter PIN to Unlock
            code: 1234
            max_retries: 3
            max_retries_delay: 30
        block:
          exemptions:
            - user: Someone Else
          text": User Interface Blocked
        exemptions:
          - user: Me

The only place I could find that you did not need the code to change the slider is obviously in the “Helpers” section and the raw code in the config file or where ever you put it.

Ps. Thanks to everyone that assisted in getting this working for me :slight_smile: