Devqon / lovelace-mini-thermostat

A mini lovelace card for controlling a thermostat
MIT License
13 stars 6 forks source link

Support for tap_action and hold_action #8

Closed martinhoess closed 4 years ago

martinhoess commented 4 years ago

Would be nice if you could add the support for tap_action and hold_action (e.g. Entity Button Card)

Tried to do something like this:

type: 'custom:mini-thermostat'
entity: climate.netatmo_livingroom
layout:
  name: Heater
tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    card:
      type: 'custom:simple-thermostat'
      entity: climate.netatmo_livingroom
      hold_action:
        action: none
      tap_action:
        action: none
      show_name: false
    title: Heater
Devqon commented 4 years ago

Closed with #19 ; in release v1.1.0

martinhoess commented 4 years ago

Thanks for adding that!

If tried it (despite HACS has again some problems), kinda works but there are 2 things

Devqon commented 4 years ago

Yeah I actually did that on purpose, because there usually are a few buttons/dropdowns in the card. But maybe it would be better to support the whole card, and disable bubbling on the buttons.

martinhoess commented 4 years ago

The deluxe variant would be different actions for all possible sections (temperature, title, ...) but this would blow up this mini card and I don't think many would use it that way. The more practicable solution would be that the actions are for the hole card