A different take on designing a Lovelace UI

Probably custom:thermostat-popup-card fullscreen: false

How about only adding appletv and not tv? Otherwise I’d need the tv attributes in dev tools

Doesn’t sound like it’s related to the UI. Have you looked into automation tracing?

Here’s what actually blocks shutdown

The lock platform is used to get a lock icon in homekit (but needed for now because it’s used in button_card_templates)

The trigger variable is only for the “locked animation” when trying to run script.home_leave

1 Like

One workaround is to use hass.user.name in button-card

In the sidebar template replace ${value} with

${k === 'greet' ? value.slice(0,value.lastIndexOf(' ')) + ' ' + hass.user.name + ' ' + value.slice(value.lastIndexOf(' ')+1) : value}

(extra code to push username before emoji)

1 Like

Tried this?

Code runs on computer, watches network share (nas)

Ah, that’s the trick. No wonder I could not find it in the code.
Thanks for your reply, great job on this design!

This did not work for me.

supported_color_modes:
  - brightness
color_mode: brightness
brightness: 51
friendly_name: Living Room Ceiling Fan Lights
supported_features: 32

But setting color_mode === brightness did.

So this works? I’ll add it

var light_color = entity.attributes.color_mode === 'color_temp' || entity.attributes.color_mode === 'brightness'

I have a Sony TV and have some additional info available via the Homekit integration on what is playing. So when Netflix is on I have added some extra info for the button.

1 Like

Yes… That worked fine. I’ve learned SO MUCH from hacking your setup. Mine is coming along great and I hope to share it someday.

1 Like

Do you mean what tool did I use?
I used a combination of SVG editors like
https://yqnn.github.io/svg-path-editor/
and

Hey ! I noticed that in your theme you use the Dark Sky api, I wanted to ask about changing the weather api but I’m still thinking about it, in any case I warn you that this api is no longer maintained due to the fact that Apple bought them, old users like you are maintained until the end of 2022, so it would be cool if you could post an update that uses a nice weather api like OpenWeatherMap or AccuWeather

Julien

No changes needed :slightly_smiling_face:

@Mattias_Persson You can help me produce template according to the following code:

  qr_code:
    type: picture
    image: local/images/qr/openwrt.png
    style:

Thanks for the reply.

TV is just the Source of the Sonos Arc, and not the TV Device itself. The Problem occurs since I’m using the same device for Listening to Music and for Outputing the TV Sound.

When streaming music, conditional media works as expected and lists the Device:
image

However, when turning off the Apple TV after watching TV, the Sonos Arc remains in the Source “tv” which displays the state as above.

I guess I would need a way to tell Conditional Media that it should just ignore the Sonos Arc if the Source is set to TV.

Try to wrap the template with this condition

{% if not is_state_attr('media_player.sonos_arc', 'source', 'TV') %}
  ...
{% endif %}

Hej Mattias, I don’t understand how to get the popups to work, I’ve added all the extensions requested with hacs but I can’t see any. When I click on the cards there is just a reflection but nothing.

currently I have these in my configs, but still not getting it to work.

button-card:

- type: custom:button-card
entity: switch.pcsetup_plug
name: PCSetup
styles:
  card:
	- border-radius: 8%
template:
  - base
  - icon_imac
  - loader
  - lock
variables:
  lock: |
	[[[
	  let lock = states['lock.dator'];
	  return lock === undefined || lock.state;
	]]]
  trigger: |
	[[[
	  let trigger = states['switch.pcsetup_plug'];
	  return trigger === undefined || trigger;
	]]]

config.yaml:
(I couldn’t leave turn_on to be blank so I left it as is)

switch:
  - platform: wake_on_lan
    name: wol_lucina
    host: 10.69.10.18
    mac: *mac address*

  - platform: template
    switches:
      computer_lucina:
        friendly_name: lucina
        icon_template: custom:imac-alternative
        value_template: >
          {{ is_state('switch.wol_lucina', 'on') }}
        turn_on:
          - service: switch.toggle
            target:
              entity_id: switch.switchbot_mqtt
          - service: light.turn_on
            target:
              entity_id: light.dator
        turn_off:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: input_boolean.computer_lock
                    state: "on"
                sequence:
                  - service: browser_mod.toast
                    data:
                      duration: 8000
                      message: Dator är låst från att stängas av...
            default:
              - service: shell_command.imac_off

lock:
  - platform: template
    name: Dator
    value_template: >
      {{ states('input_boolean.computer_lock') }}
    lock:
      service: input_boolean.turn_on
      entity_id: input_boolean.computer_lock
    unlock:
      service: input_boolean.turn_off
      entity_id: input_boolean.computer_lock