Quantcast
Channel: Configuration - Home Assistant Community
Viewing all 105697 articles
Browse latest View live

Z-wave missing completely random after restart of HA

$
0
0

@2stimpy wrote:

I have been searching for a while to find more information about my z-wave problem.
Nothing i can find to solve my problem, so here it goes.

I have Hassio running on a nuc in docker on Debian.
I have a Aeotec Z-Stick Gen5 and 6 neo coolcam door window sensors and one neo coolcam motion sensor.
It ran fine for almost 5 months but now I run in to this problem that my Z-wave does not work anymore after a restart of HA.
This happens randomly 9 out of 10 times.
This is very frustrating because I hardly dare to change the config file after which a restart is necessary.

If the problem occurs than the z-wave network is not started after the restart, and if I press to manually start the network. It won’t start.

The only way I know of to get it working again is to revert to a previous made snapshot.
But of course that deletes all the changes I made to the system files.

So I will have to do it all over again and pray that after the next restart my z-wave will start and function properly.

I also tried saving the z-wave config before a restart, but that does not make a difference.
This has been going on for 6 weeks now.
I hope that someone can help me solve this issue because this is starting to get very annoying.

Posts: 7

Participants: 4

Read full topic


MariaDB and backup, Snapshot?

$
0
0

@TheStigh wrote:

Hi all,

I’ve just installed MariaDB, and wonder if this database is backed up by Snapshot ?
If not, can it be backed up by HA somehow ?

Posts: 2

Participants: 2

Read full topic

Changing an ugly script into something nice for Hue control

$
0
0

@Ralph_Bisschops wrote:

Hi All,

I’m trying to change a rather ugly piece of code in a script into something nice.
Here is the original script:

  ## Added V1.2.0
  ## Script for setting Hue lamps in video or normal mode
  ## used in package_media_center
  hue_mode_change:
    alias: Licht aanpassen voor video of normale mode
    sequence:
      - service: script.set_hue_scene_auto
        data_template:
          brightness_stop_group_1: >
            {% if (states.input_select.livingroom_lights_mode.state == "Video") %}
              90
            {% else %}
              100
            {% endif %}
          brightness_stop_group_2: >
            {% if (states.input_select.livingroom_lights_mode.state == "Video") %}
              100
            {% else %}
              150
            {% endif %}
          profile_stop_1: >
            {% if (states.input_boolean.christmas_mode.state == "on") %}
              "christmas_normal_1"
            {% else %}
              "normal_1"
            {% endif %}
          profile_stop_2: >
            {% if (states.input_boolean.christmas_mode.state == "on") %}
              "christmas_normal_2"
            {% else %}
              "normal_2"
            {% endif %}
          transition: 5

Bassically I wnat to get rid of the double if statements
This is what I’d like to do after trying other variants as well:

  ## Added V1.2.0
  ## Script for setting Hue lamps in video or normal mode
  ## used in package_media_center
  hue_mode_change:
    alias: Licht aanpassen voor video of normale mode
    sequence:
      - service: script.set_hue_scene_auto
        data_template:
          brightness: >
            {% if (states.input_select.livingroom_lights_mode.state == "Video") %}
              {% set brightness = {"one": 90, "two": 100} %}
              {{ brightness }}
            {% else %}
              {% set brightness = {"one": 100, "two": 150} %}
              {{ brightness }}
            {% endif %}
          profile: >
            {% if (states.input_boolean.christmas_mode.state == "on") %}
              {% set profile = {"one": "christmas_normal_1", "two": "christmas_normal_2"} %}
              {{ profile }}
            {% else %}
              {% set profile = {"one": "normal_1", "two": "normal_2"} %}
              {{ profile }}
            {% endif %}
          transition: 5

With the last example code the next script should do this:

  ## Script for setting Hue lamps into a new mode (from off)
  ## 
  set_hue_scene_auto:
    alias: Set hue mode overgang naar andere scene
    sequence:
      - service: light.turn_on
        data_template:
          entity_id: light.lage_kasten_hue
          # brightness: "{{ brightness_stop_group_1 }}"
          # profile: "{{ profile_stop_1 }}"
          brightness: "{{ brightness.one|int }}"
          profile: "{{ profile.one }}"
          transition: "{{ transition|float }}"
      - service: light.turn_on
        data_template:
          entity_id: light.staande_lampen_hue
          # brightness: "{{ brightness_stop_group_2 }}"
          # profile: "{{ profile_stop_2 }}"
          brightness: "{{ brightness.two|int }}"
          profile:  "{{ profile.two }}"
          transition: "{{ transition|float }}"

I left in the original code lines (commented) that were in the code that worked with the original script.

Who can help me out here. The code is not reporting errors (on config check) but is not working.

Thanks all,

Ralph

Posts: 1

Participants: 1

Read full topic

RestAPI, Bad Request

$
0
0

@wjaceh wrote:

Hi,

I’m trying to send some text to conversation integration over RestAPI (at the moment using python script), but I’m getting “400: Bad Request”.

import requests
import json

url = 'http://192.168.50.21:8123/api/services/conversation/process'
headers = {
    'Authorization': 'Bearer my_long_lived_token',
    'content-type': 'application/json'
    }
payload = {
    'service_data':{
        "text": "Turn all lights on"
        }
    }

response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.text)
print(response.status_code)


Can anyone spot the mistake?
PS: I’m quite new to coding so the whole thing might be misunderstood from my side.

Posts: 1

Participants: 1

Read full topic

Zigbee2MQTT: How to config it for two CC2531 dongles

$
0
0

@DenisIO wrote:

My Hardware is RPi 4 + CC2531 dongle.
Software is latest HA + Mosquito MQTT Brocker + Zigbee2MQTT
I successfully control my Gledopto RGB and IKEA bulbs using first CC2531 dongle.
But now I want to add one more CC2531 dongle to control Livolo switches.
“These devices can only be used on channel 26. These devices are locked to the manufacturer’s network key (ext_pan_id)” see https://www.zigbee2mqtt.io/devices/TI0001.html
Please advise how to config zigbee2mqtt to create two networks.
Thanks in advance.

My current zigbee2mqtt config with one CC2531 dongle looks like this:
{
“data_path”: “/share/zigbee2mqtt”,
“devices”: “devices.yaml”,
“groups”: “groups.yaml”,
“homeassistant”: true,
“permit_join”: false,
“mqtt”: {
“base_topic”: “zigbee2mqtt”,
“server”: “mqtt://core-mosquitto:1883”,
“user”: “mqtt-user”,
“password”: “mqtt-user”
},
“serial”: {
“port”: “/dev/ttyACM0”
},
“advanced”: {
“pan_id”: 6754,
“channel”: 11,
“network_key”: [
1,
3,
5,
7,
9,
11,
13,
15,
0,
2,
4,
6,
8,
10,
12,
13
],
“availability_blacklist”: []
},
“ban”: [],
“whitelist”: [],
“queue”: {},
“socat”: {
“enabled”: false,
“master”: “pty,raw,echo=0,link=/dev/ttyZ2M,mode=777”,
“slave”: “tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5”,
“restartdelay”: 1,
“initialdelay”: 1,
“options”: “-d -d”,
“log”: false
}
}

Posts: 2

Participants: 2

Read full topic

Use previous status (ignoring unknow status) of an entity to do the action

$
0
0

@anthosz wrote:

Hello,

Due to this issue (https://github.com/home-assistant/home-assistant/issues/30112), I cannot use the aqara switch to close/open the cover with the push on the button.

Example:

 - id: '123'
   alias: Ouverture volets rdc
   description: ''
   trigger:
   - event_data:
       click_type: single
       entity_id: binary_sensor.switch_XXXX
     event_type: xiaomi_aqara.click
     platform: event
   condition:
   - condition: or
     conditions:
     - condition: state
       entity_id: cover.XXXX
       state: closed
     - condition: state
       entity_id: cover.XXXX
       state: closed
     - condition: state
       entity_id: cover.XXXX
       state: closed
     - condition: state
       entity_id: cover.XXXX
       state: closed
   action:
   - data:
       entity_id: cover.volets_rdc
     service: cover.open_cover

So before this issue, was no issue because states works (if one of the covers was close => open all the covers with a single push). Once, done, a new single push close all the covers.

Now I have an issue :smiley: The status of entity move to unknow after one minute… Due to that, I cannot use anymore the single push.

My questions:

  1. If I try to duplicate this automation, will generate a loop no?
    Example:
  • Open:
 - id: '123'
   alias: Ouverture volets rdc
   description: ''
   trigger:
   - event_data:
       click_type: single
       entity_id: binary_sensor.switch_XXXX
     event_type: xiaomi_aqara.click
     platform: event
   action:
   - data:
       entity_id: cover.volets_rdc
     service: cover.open_cover
  • Close
 - id: '1234'
   alias: Fermeture volets rdc
   description: ''
   trigger:
   - event_data:
       click_type: single
       entity_id: binary_sensor.switch_XXXX
     event_type: xiaomi_aqara.click
     platform: event
   action:
    - data:
       entity_id: cover.volets_rdc
     service: cover.close_cover

Due to the fact that there are no conditions for both (because no status anymore), how HA will manage it? Segfault?

  1. It’s possible to use a condition on a previous “not unknow” state of the switch.
    Example:
    The current hour is 20h and the switch (cover) is in unknow status, the last good condition was good at 16h30 (cover closed). Based on the fact the last good status was close for this cover, can we use it in a condition to allow to open the cover when we push a single on the button?
    image
    This is like if I want to tell in the condition "so, take the last good status (ignoring unavailable/unknow status & whitelist only open/close) for this entity, if the the last status is closed -> so open the cover.

I hope that it’s clear for you :smiley:

Doesn’t hesitate if you need more informations ^ ^

Posts: 2

Participants: 2

Read full topic

Input Bool -> binary sensor bit status not changing

$
0
0

@Doranagun wrote:

setting up a boolinputs.yaml file
contents are only…

input_boolean:
# used by NodeRed Home/Away for a few humans.
  home_occupied:
     name: "Is Someone Home"


binary_sensor:
  - platform: template
    sensors:
      is_someone_home:
        friendly_name: "Home In Use"
        value_template: >-
           "{ is_state('input_boolean.home_occupied', 'on') }"

input bool toggles with NodeRed using turn_on or turn_off.
Binary sensor does not update.

Whoever wrote node red needs their head examined for some of the idiosyncrasies of it…
A true/false pair on an event state that outputs…

Input Device - True…
Evaluation Comparison - True
Evaluates True…
Output True = True…
Output False = Null.

Input Device - False
Evaluation comparison is False.
Evaluates False… (whaaat?)
Output True - Null
Output False - False. (WHAT!?)

This should evaluate is TRUE, output true should go high, false should go low.
Da hell? NEVER should it output Null. if the eval is True (regardless of the values the evaluation uses). The reason behind that would be dual state actions. If your evaluation is true, then the true output goes high and false goes low. if the eval is not true then true goes low and false goes high. this is basic freaking logic… who the hell wants a null value… causes annoying issues with basic gate logic… a false in node red is still a true for a gate… The false logic is even more scatterbrained.

Posts: 4

Participants: 2

Read full topic

Template sensor for automation with timestamp not updating

$
0
0

@Impulz wrote:

Hi all,

I use the Google Calender Event with great success. So I loaded all the dates in seperate calendars per bin for emptying the bins because there is no integration (yet) for that company.

I found a post where someone wanted exactly the same, but I don’t understand why mine doesn’t notify me.
I want to be notified 37800 seconds (10,5h) and 30600 seconds (8,5h) before the actual event.

So I made 6 template sensors, which relates with the sensor.date_time_iso of the Time & Date integration.

Here is one of them:

platform: template
sensors:
    red_bin_offset:
      entity_id: calendar.oud_papier1
      friendly_name: 'oud papier tijd'
      value_template: '{% if as_timestamp(states.calendar.oud_papier1.attributes.start_time) - as_timestamp( strptime(states.sensor.date_time_iso.state, "%H:%M" ) ) < 37800  %}on{% else %}off{% endif %}'

And I made a template sensor for the days it takes till they are going to empty the bin:

platform: template
sensors:
    datum_papier:
      entity_id: calendar.oud_papier1
      friendly_name: 'Oud papier'
      value_template: '{{ (( as_timestamp(strptime(states.calendar.oud_papier1.attributes.start_time, "%Y-%m-%dT%H:%M:%S")) - as_timestamp( strptime(states.sensor.date_time_iso.state, "%H:%M" )))/ (3600*24)) | round(0) }}'
      unit_of_measurement: 'dagen'

The sensors show up correctly in Home Assistant:

sensor.red_bin_offset	off	       friendly_name: oud papier tijd
sensor.datum_papier	    25	       unit_of_measurement: dagen
                                   friendly_name: Oud papier
                                   icon: mdi:delete-empty

If I use the template editor in the dev section, the state returns off like it should, if I change the seconds to longer than it actually takes for the time they empty it, it returns on.

So I made an automation to notify all the devices to put the bin out. And made a input boolean to activate when the bin actually is out.

automations:
- id: Oudpapierbak
  alias: '[Garbage] Red Bin Reminder'
  trigger:
  - entity_id: sensor.red_bin_offset
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - condition: state
    entity_id: input_boolean.bins_out
    state: 'off'
  action:
  - data:
      data:
        push:
          category: redbins
      message: moet bij de weg.
      title: Oudpapier container
    service: notify.home_assistant

But for some reason, it doens’t update the sensor how many days is left, and the template sensor doesn’t turn to on.

I read a lot of articles about this problem, and the answer was that there needs to be a sensor that updates from itself, so I use

sensor.date_time_iso

because it is the only sensor with a timestamp.

It has become a long story, but I rather give to much information and be sure I told everything what I think is usefull to discover my error.

Posts: 1

Participants: 1

Read full topic


Change button entity based on state of another entity - Solved

$
0
0

@nellicus wrote:

TL;DR: What would be the best way to change an entity of a button based on the state of another entity?

I am automating my theater setup and integrating Harmony activities. When you visit the main control panel for the theater you are greeted with 2 buttons to select either “TV” or “Projector”. These buttons control an input_select

input_select:
  theater_media_mode:
    name: Media Mode
    options:
      - "None"
      - "TV"
      - "Projector"
    initial: None
    icon: mdi:target

Once a media mode is selected I have a conditional entity that displays a card with the source choices.

type: vertical-stack
cards:
  - type: 'custom:button-card'
    color_type: label-card
    color: 'rgb(44, 109, 214)'
    name: TV
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        entity: switch.tv_appletv
        color_type: card
        show_entity_picture: 'true'
        entity_picture: /local/Apple-TV.svg
        state:
          - value: 'on'
            color: 'rgb(20, 120, 220)'
        show_state: false
        show_name: false
      - type: 'custom:button-card'
        entity: switch.tv_shield
        color_type: card
        show_entity_picture: 'true'
        entity_picture: /local/Nvidia-01.svg
        state:
          - value: 'on'
            color: 'rgb(20, 120, 220)'
        show_state: false
        show_name: false
- type: 'custom:button-card'
        entity: switch.tv_raspberrypi
        color_type: card
        show_entity_picture: 'true'
        entity_picture: /local/Raspberry-PI-01.svg
        state:
          - value: 'on'
            color: 'rgb(20, 120, 220)'
        show_state: false
        show_name: false

Since you will be able to select the same sources for either TV or Projector, what would be the best way to make the entity dynamic?

If entity: input_select.theater_media_mode = projector

the button would be:

- type: 'custom:button-card'
        entity: switch.prj_raspberrypi
        color_type: card
        show_entity_picture: 'true'
        entity_picture: /local/Raspberry-PI-01.svg
        state:
          - value: 'on'
            color: 'rgb(20, 120, 220)'
        show_state: false
        show_name: false

If entity: input_select.theater_media_mode = tv

the button would be:

- type: 'custom:button-card'
        entity: switch.tv_raspberrypi
        color_type: card
        show_entity_picture: 'true'
        entity_picture: /local/Raspberry-PI-01.svg
        state:
          - value: 'on'
            color: 'rgb(20, 120, 220)'
        show_state: false
        show_name: false

Posts: 3

Participants: 2

Read full topic

0.103.4 Can't reach Front End

$
0
0

@Jer78 wrote:

Suddenly I’m getting this error and no way to access the front end. Ideas?

2019-12-23 17:13:58 ERROR (MainThread) [homeassistant.components.http] Failed to create HTTP server at port 8123: [Errno 48] error while attempting to bind on address (‘0.0.0.0’, 8123): address already in use

Posts: 3

Participants: 2

Read full topic

Hassio keeps crashing

$
0
0

@Floris1 wrote:

Recently Home Assistant started acting weird. It just crashed out of nowhere. It hasn’t done that in a long time but okay, I just reflashed HA to the sd card and restored my snapshot. Everything was fine and running good until it crashed again. This time the sd card wouldn’t format so i grabbed another one (16GB) and repeated the proces. Again running fine for a day and then crashed again. It keeps doing this. I installed the newest version of HA and hassio but that still doesn’t work. Whats also weird is that the cpu is constantly at around 4% usage but ram is constantly at around 88%. I also tried to install less addons. Now the only two that are running are mosquito broker and samba but that still doesn’t help. I’m also getting a lot of power management disabled messages. I’m running Hassio on an RPI 3B with a 5v 2,4A power supply.

Any ideas how i can fix this?

Posts: 1

Participants: 1

Read full topic

Entity_id wildcard

$
0
0

@schluggi wrote:

Hi ,

i’ve got an problem with condition templating. I want to get notified if one of my battery-sensors has changed there state. I looked around and found this example, witch sadly not work in my case…

 - alias: Battery
    trigger:
      platform: event
      event_type: state_changed
      event_data:
        domain: sensor
    condition:
      condition: template
      value_template: "{{ trigger.event.data.entity_id.startswith('battery_') }}"
    action:
      service: notify.telegram
      data_template:
        message: "\U0001F50B Battery {{ trigger.to_state.attributes.friendly_name }} has changed to {{ trigger.to_state.state }}"

I always got this error:

ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: extra keys not allowed @ data['condition'][1]['state']. Got None
not a valid value for dictionary value @ data['condition'][1]['condition']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 629). Please check the docs at https://home-assistant.io/integrations/automation/

Thank you for helping and happy Christmas Eve :wink:

Posts: 1

Participants: 1

Read full topic

How to connect the homeassistant mobile app in Google store to the homeassistant in raspberry pie

Sonos volumen up

$
0
0

@Jose_Luis_Maza_Perez wrote:

Im trying to find some tags in the manual to create a script for volumen in sonos, but cant find nothing. I have a script to set a vollumen to a concrete percentil like at 20%, but cant find nothing to make a volume op, or to stop everything is playing :frowning:

Posts: 1

Participants: 1

Read full topic

Ike wireless dimmer


Connecting to wifi

$
0
0

@David-OConnor wrote:

How can you configure HA, on Raspberry PI, to connect via WIFI? Use case example: Accessing HA from a computer not on ethernet, or a mobile phone.

Should this just work out of the box, or do I need to do config?

What happens currently. On HA Android app: “Unable to find your Home Assistant Instance”
Opening http://hassio.local:8123 in a web browser, : “Server not found”.

Posts: 3

Participants: 3

Read full topic

Very simple notification

$
0
0

@vazquezjm wrote:

Trying to make this simple notification send, triggered by time. No luck :confused:

# Notifications test
- id: '1577144865421'
  alias: Notifications
  description: ''
  trigger:
  - platform: time
    at: '21:25:00'
  condition: []
  action:
  - service: notify.notify
    message: This is a notification

Posts: 2

Participants: 2

Read full topic

Need sanity check of ideas on entities for device frequently suspended

$
0
0

@treydock wrote:

I am fairly new to Home Assistant and am working my way towards a complete config. I have setup Plex and Sabnzbd integrations but the issue I’m facing is the host that runs these services is my power hungry desktop and is frequently suspended to save power and avoid needless hard drive wear. If I restart HA while my desktop is suspended then the states for Plex and Sabnzbd disappear which is a problem as I’ve setup automations that when plex watched state changes to 0 the desktop is suspended if not being used. I’ve hacked around this situation by setting up an automation to restart HA when my desktop begins to respond to ping via binary sensor for ICMP to ensure sabnzbd and plex integrations are functional.

Is there a better approach to handling entities for services running on a device that isn’t always on?

In case it helps to see, these are the automations I’m working with:

- alias: 'Turn on compute'
  trigger:
    - platform: state
      entity_id: binary_sensor.desktop_ping
      to: 'on'
  action:
    - service: script.restart_ha
- alias: 'Turn off computer when idle'
  trigger:
    - platform: state
      entity_id: sensor.desktop_ssh_connections
      to: '0'
    - platform: state
      entity_id: sensor.plex_desktop
      to: '0'
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sensor.desktop_ssh_connections
        state: '0'
      - condition: state
        entity_id: sensor.desktop_active
        state: '0'
      - condition: state
        entity_id: sensor.plex_desktop
        state: '0'
      - condition: or
        conditions:
          - condition: state
            entity_id: sensor.sabnzbd_status
            state: 'Idle'
          - condition: state
            entity_id: sensor.sabnzbd_status
            state: 'Paused'
  action:
    service: switch.turn_off
    data:
      entity_id:
        - switch.desktop

Posts: 1

Participants: 1

Read full topic

Automated snapshot optimisation

$
0
0

@tom_l wrote:

Thought this might be of use to someone.

I don’t use the google drive backup addon as I don’t like using passwords on my snapshots (as it is impossible to extract files without restoring) and do not want this unprotected data in the cloud.

So I create an automated snapshot every night and use a file sync utility on another always on PC to copy the snapshot. This is then copied to my off-site backup monthly.

Later in the morning I run the snapshot cleanup service to only keep the last 20 snapshots.

The problem is that my snapshots have become huge (820MB+) and while they do complete successfully they do generate time out / api errors. This is despite the liberal use of the exclude option in the recorder.

So instead of doing a full snapshot I now do a partial snapshot of everything except the MariaDB and ESPhome addons. I can live with lost history data and all the esphome files required get backed up in the config folder anyway.

Also I have the MariaDB config saved to a text file for easy restoration.

This has taken my backups from 7 minutes of 70% peak processor use generating an 820MB+ file to 10s of seconds at 20% CPU generating a 60MB file.


There is not a lot of information on how to automate a partial snapshot so I include my automation here (with the old full snapshot config commented out):
- id: daily_backup_at_1_am
  alias: Daily Backup at 1 AM
  initial_state: true
  trigger:
    platform: time
    at: '01:15:00'
  action:
  # - service: hassio.snapshot_full
  #   data_template:
  #     name: Automated Backup {{ now().strftime('%Y-%m-%d') }}
  - service: hassio.snapshot_partial
    data_template:
      name: "Automated Backup {{ now().strftime('%Y-%m-%d') }}"
      addons:
        # - 15ef4d2f_esphome
        - a0d7b954_aircast
        - a0d7b954_portainer
        - a0d7b954_ssh
        - a0d7b954_vscode
        - addons_local
        - core_duckdns
        # - core_mariadb
        - core_mosquitto
        - core_samba
        - core_ssh
      folders:
        - homeassistant
        - share
        - ssl
  - service: notify.telegram_system
    data_template:
      title: '*Information*'
      message: "Creating backup named Automated Backup {{ now().strftime('%Y-%m-%d') }}"

The names of your addons can be found inside a full snapshot or by looking at the URL when viewing the hassio addon page for each addon.

I don’t know what addons_local is but it was in the full snapshot so I included it (it’s empty with my selection of addons). Interestingly it does not show up in the partial snapshot (right hand side).

I just noticed the VSCode addon is responsible for over three quarters of the snapshot size now and as it has the default config and is easy to replace I’ll remove that from the snapshot too.

Posts: 1

Participants: 1

Read full topic

Assistance combining 2 working cards

$
0
0

@nellicus wrote:

I am attempting to combine 2 cards that work independently. I can’t seem to get the spacing and indentation correct to add them to a vertical stack. Is there a tool or rune of thumb/tricks to this. I was able to work with it before the style of the text changed from the examples on the docs to being mucked by the interface editor.

Top Half

cards:
  - color: 'rgb(117, 117, 117)'
    color_type: label-card
    name: Media Mode
    type: 'custom:button-card'
  - cards:
      - color_type: icon
        entity: input_select.theater_media_mode
        hold_action:
          action: none
        icon: 'mdi:television'
        label: TV
        show_icon: true
        show_label: true
        show_name: false
        show_state: false
        size: 60%
        state:
          - color: 'rgb(20, 120, 220)'
            value: TV
        tap_action:
          action: call-service
          service: input_select.select_option
          service_data:
            entity_id: input_select.theater_media_mode
            option: TV
        type: 'custom:button-card'
      - color_type: icon
        entity: input_select.theater_media_mode
        hold_action:
          action: none
        icon: 'mdi:projector'
        label: Projector
        show_icon: true
        show_label: true
        show_name: false
        show_state: false
        size: 60%
        state:
          - color: 'rgb(20, 120, 220)'
            value: Projector
        tap_action:
          action: call-service
          service: input_select.select_option
          service_data:
            entity_id: input_select.theater_media_mode
            option: Projector
        type: 'custom:button-card'
      - card:
          color: 'rgb(255, 0, 0)'
          color_type: icon
          entity: remote.theater
          hold_action:
            action: none
          icon: 'mdi:power'
          label: Power Off
          show_icon: true
          show_label: true
          show_name: false
          show_state: false
          size: 60%
          tap_action:
            action: call-service
            service: remote.turn_off
            service_data:
              entity_id: remote.theater
          type: 'custom:button-card'
        conditions:
          - entity: remote.theater
            state_not: 'off'
        type: conditional
    type: horizontal-stack
type: vertical-stack

Bottom Half

card:
  cards:
    - cards:
        - card:
            color_type: card
            entity: switch.tv_appletv
            entity_picture: /local/Apple-TV.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_appletv
            entity_picture: /local/Apple-TV.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
        - card:
            color_type: card
            entity: switch.tv_shield
            entity_picture: /local/Nvidia-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_shield
            entity_picture: /local/Nvidia-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
        - card:
            color_type: card
            entity: switch.tv_raspberrypi
            entity_picture: /local/Raspberry-PI-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_raspberrypi
            entity_picture: /local/Raspberry-PI-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
      type: horizontal-stack
    - cards:
        - card:
            color_type: card
            entity: switch.tv_wallhdmi
            entity_picture: /local/Settings-input-hdmi-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_wallhdmi
            entity_picture: /local/Settings-input-hdmi-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
      type: horizontal-stack
  type: vertical-stack
conditions:
  - entity: input_select.theater_media_mode
    state_not: None
type: conditional

Posts: 1

Participants: 1

Read full topic

Viewing all 105697 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>