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

Running an Older Version of Home Assistant OS (both Core and Supervisor)

$
0
0

Good morning, for educational purposes, I need to run a version of Home Assistant OS prior to 2023.3.0 (both Core and Supervisor!). Is this possible?

I tried installing an older version of the Supervisor by downloading the .vdi from GitHub (I disabled Supervisor’s auto-update with the command: ha supervisor options --auto-update=false), but on the first boot, Core automatically updates back to 2024. If I disconnect the internet, it won’t start.

Thank you!

1 post - 1 participant

Read full topic


Matter Add-on not installing

$
0
0

I’m running home assistant via HA OS on a Raspberry Pi, all software is on the latest, stable version. When trying to install the Matter Add-on, the installation starts but then just hangs with the endlessly rotating circle and the message, that the Add-on installation is finalized - which never happens.
I did a restart and all but the result is always the same. As this does not seem to be a common issue, can you please advise what to do/check? Thanks

2 posts - 2 participants

Read full topic

Apexcharts-card, can I show the first value in the header?

$
0
0

I have a apexcharts-card to show some forecast-data. But if I use show_states in the header it shows the last state. I want to show the first state (todays value). Is this possible ?

type: custom:apexcharts-card
experimental:
  color_threshold: true
  brush: true # This is required
header:
  show: true
  show_states: true
  title: Prognos Vattenföring
apex_config:
  chart:
    type: line
  xaxis:
    type: datetime
    tickAmount: 8
    labels:
      format: dd MMM
  yaxis:
    decimalsInFloat: 0
graph_span: 8d
span:
  start: day
series:
  - entity: sensor.vattenwebb_rest
    type: area
    stroke_width: 1
    color_threshold:
      - value: 300
        color: green
      - value: 450
        color: yellow
      - value: 600
        color: red
    data_generator: |
      return entity.attributes.data

1 post - 1 participant

Read full topic

Power-flow-card-plus change color dependent on darkmode

$
0
0

I want to change the color dependent on darkmode.
That is the standard and then always set.

type: custom:power-flow-card-plus
style_card_content: |
  background: lightgrey
entities:

I was trying, but that is not working:

type: custom:power-flow-card-plus
style_card_content: |
        [data-theme="dark"] {background: rgb(100, 200, 100)}
        [data-theme="light"] {background: rgb(200, 400, 200)}  
entities:

How can I change the background dependent on darkmode?
or Can I change that it stays with day mode?
thanks for hep!

1 post - 1 participant

Read full topic

Read/Write Data to/from txt/csv file

$
0
0

Apologies, but I need a dummy explanation for the “platform: file” thing.

I have a sensor, sensor.t_h_sensor_2_temperature_2
I made a 24h average out of this, sensor.24h_temp_blaueshaus_linear
(Sorry, German involved)
I store that sensor value everyday at 0300 am using an automation

alias: AAA 24Temp OnceADay 0300
description: ""
trigger:
  - platform: time
    at: "03:00:00"
condition: []
action:
  - data_template:
      entity_id: input_number.aa_temp_24h_0300_morgens
      value: |
        {{ states("sensor.24h_temp_blaueshaus_linear")|float }}
    service: input_number.set_value
mode: single

All of this, so far, works fine.

Now, I would really like to enter this 03:00 sensor value into a csv file, either replacing or adding to preexisting data.

I have read this and this cerntainly helpful threads on the topic, but I’ve understood no further than “use the platform: file” thing, the documentation of which comes with funny instructions like “specify file path, e.g.:”

/home/user/.homeassistant/sensor-data.txt

and while I managed to get network access to my HA thanks to some very nice people on youtube, I don’t see a “home” direcory, or a “user” directory, and certainly not a -homeassistant directory. let’s say I want to put the data in /config/www/samplefile.csv, because I can access this directory.

What sourcecode do I have to put where, exactly?

Please, pretty please, I really need the dummy explanation. As in "In your config.yaml, add (THIS), in your sensors.yaml do (THIS), then make an automation that does yaml (THIS).

Thank you in advance. And how do I automate this every time a sensor value changes? How do I either add to the file or replace the value? Can I limit that to the last 72h?

Essentially, my ultimate goal is to register every time an automation actually triggers, I want a logfile of that.

1 post - 1 participant

Read full topic

Can't access Dockerized HA webserver through VPN, but can access all other containers

$
0
0

I’m running containerized HA via docker-compose running on a raspberry pi 4 8gb

My HA instance is on at http://192.168.0.5:8123/, i can access that from the local net, but not the VPN
My Node-Red instance is accessible at http://192.168.0.5:1880 from the local net and the VPN
My Hass-configurator instance is available at http://192.168.0.5:3218, I can also access this from both the local net and vpn

I noticed that it seemed like the webpage was loading forever so I curled it, and that was successful as well. Let me know if any of you would like to see curl output

I only have one error in my error log, but I’ve been getting that error since I installed HA and long before I attempted connecting via VPN:

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 4:22:38 AM (92 occurrences)
Last logged: 4:30:14 AM 
Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 350, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
  Invalid method encountered:

    b'\x16\x03\x01\x01T\x01'

Since I can navigate to the node-red and hass-configurator pages, I have to assume the issue lies directly with Home Assistant. I haven’t edited my configuration.yaml in any way to support using the VPN (i.e. allowing connection from the vpn’s lan), am I missing something?

1 post - 1 participant

Read full topic

Trying to work out PV usage

$
0
0

I have a storage-heated house that can draw lots of Amps. I got a new 10kWp solar installation that does 14kW when sunny, the switched heating system can draw up to 18kW in total. I’m pretty close to optimal usage using a timetable, I have several dozen timed automations like this:

- id: '1711540718498'
  alias: Haus(2a) EIN 12:05 <23.0
  description: ''
  trigger:
  - platform: time
    at: '12:05:00'
  condition:
  - condition: numeric_state
    entity_id: input_number.aa_temp_24h_0300_morgens
    below: 23
  action:
  - type: turn_on
    device_id: 39bc377754f536398d9291f31f0d6e63
    entity_id: 1df9d1374b6ed61b849b6434ac301b1d
    domain: switch
  mode: single

What it does is trigger a high-Voltage contactor (three, actually) based on a manual timetable. I’m working on getting this automated better, but essentially, I store 24h linear temperature reading at 03:00 am, and then, every now and then, in sequence, the three circuits trigger the storage heating systems when the sun is (likely) shining.

I do get rather good forecast data on sunshine, I have established values for storage heating “on-time” for set outdoor temperature ranges, so my idea is, based on outdoor temperature past 24h, I make three variables, “heating_time_1” to 3.

No idea how to do that.

Based on these varaibles, you can calculate kW needed, and since HA knows prospective sunshine, it can - at 03:00am - plan ideal switch times (no idea how to do that, either). This should be triggered every 15 minutes or so (no idea how to do that, either), maybe based on actual PV generation (HA knows that, too).

Essentially, if my PV generates less than half I need, my timetable system (about 42 automations) uses >95% of PV energy; there’s also a 6.6kW Battery. If it generates what I need or more, efficiency drops vastly; I still buy energy, then sell energy for 1/6th of the price. This certainly can be optimized, but I do need help doing that.

What I need to know:

How do I “make” the calculations and “set” the three “heating time” variables?
How do I (automatically) “adjust” the timetable, seuqentially, based on expected sunshine?
How do I make an automation (or three) that switches based on the calculated timetable and self-adjusts on actual sunshine?

Oh, an there’s the curcuit breaker problem, it’ll blow if more than 27.7kW are dran.- The switched parts are 18kW in total, but there’s non-switched parts consisting of randomly working 7kW water boilers, additional heaters totalling ~5kW, and of course about 8kW stove. I already have a “Watchdog” running ‘if total Power >27kW then switch everything switchable off’, but that really may disturb my scheduling if someone decides to cook at 12 noon when the schedule isn’t sequential.

Yes, this is in Europe, and yes, everything was done by an electrician, and yes, the house came with 2x3-phase 32A fuses, and it won’t need more than 44kW at any time. But with the PV, you can’t have two three-phase circuits, and one three-phase circuit is limited to 40A max, so there you are with the 27.7A. Homeassistant is faster than the fuse, the fuse will take an overload for up to 8 seconds.

1 post - 1 participant

Read full topic

Zigbee & HA & Google Home?

$
0
0

Hi folk,
I have started moving my old wifi switches to zigbee, I have a Sonoff zigbee usb dongle connected to HA and integrated my first 4 switches fine but I can’t seem to get them to be exposed to google home, which is a big issue :grimacing: (wife has a nest hub she controls lights etc. and if it doesn’t get the approval it goes…)
Can I have zigbee devices on HA and expose them to google home (the wifi devices are connected to HA through tuya local and the tuya app is exposed to google home)

3 posts - 3 participants

Read full topic


Lovelace/Markdown Card - Waste Collection as timestamp and "Days left"

$
0
0

Hi there.

Trying to improve my dashboard atm. I now included the waste_collection_schedule via HACS. I successfully configured it and now I want to create a Markdown card for the next collection.

This is what I have done right now.

Sensors:

 # next collection
  - platform: waste_collection_schedule
    name: "Nächste Abholung"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
  #next ohne Tage
  - platform: waste_collection_schedule
    name: "Nächste Abholung Tage"
    value_template: '{{ value.daysTo }}'
  # Nächste Restmüll-Abholung
  - platform: waste_collection_schedule
    name: "Restmüll"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Hausmüll
  # Nächste Biomüll Abholung
  - platform: waste_collection_schedule
    name: "Biomüll"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Biomüll
  # Nächste gelber-Sack Abholung
  - platform: waste_collection_schedule
    name: "Gelber Sack"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Gelbe Tonne
  # Nächste Papiermüll Abholung
  - platform: waste_collection_schedule
    name: "Papier"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} Tagen{% endif %}'
    types:
      - Papiertonne

Markdown Card

  {{ states.sensor.nachste_abholung.attributes.values() | first |
  replace("papier", "Papiermüll") | replace("gelbersack", "Gelber Sack") |
  replace("rest", "Restmüll") }}: {{ states.sensor.nachste_abholung.attributes | first | as_timestamp |
  timestamp_custom("%a, %d.%m.") }} (in ... )

After the last word “(in …)” I want to publish the days left for the next waste collection. Unfortunelty I am not able to do it.

Can you help me?

Thanks!

1 post - 1 participant

Read full topic

Flo by Moen - use in Europe?

$
0
0

I’m looking into getting a water monitoring component for my home. And of all the ones that I’ve seen Flo seems to be the most complete (monitoring plus shut-off option).

However, I don’t live in the US or Canada. The support told me that I won’t be able to download the app if I’m not there and in fact Google tells me that it’s not available for my region.

So my question is: if I only want to use Flo through Home Assistant, do I need the app at all? Could I configure things directly in HA without the need for the or is the app required?

5 posts - 3 participants

Read full topic

Central heating automation turn off if a window and door have been left open

$
0
0

HI there,

I have a few door and window sensors that i would like to help control my HVAC system. I have controllable vents in each main room. This more so applies to bedrooms / bathrooms however.

I would like to create an automation that if a bedroom window and corresponding door has been left open it will turn off the HVAC system until they have been closed.

Do i create a seperate automation per room or would it be possible to have all in one automation?

Thank you!

11 posts - 3 participants

Read full topic

Card-mod change Icon color based on scraped text

$
0
0

I am scraping text from a page that shows the current Fire restrictions. I’m trying to use card mod to color the icon based on the text scraped the options are as follows:

  • Burning is not allowed [Icon is Red]
  • Burning is only allowed between 7:00 pm and 8:00 am (burning is not allowed before 7:00pm) [Icon is Yellow]
  • Burning is allowed between 2:00 pm and 8:00am [Icon is Green]

I’ve gotten as far as changing the color but without any conditions, the icon is forever red currently.

type: entities
entities:
  - entity: sensor.fire_restriction
    name: Halifax County
title: Fire Restrictions
state_color: false
show_header_toggle: false
card_mod:
  style: |
    :host {
      --card-mod-icon-color: red
    }

Thanks,
Rob

1 post - 1 participant

Read full topic

Utility Meter showing as selector

$
0
0

Hi

I’m trying to setup a utility meter to calculate my peak and offpeak energy cost.

I have added this to my config file

# EV Enerrgy Consumption
utility_meter:
  daily_energy:
    source: sensor.shellyem_c45bbee1cb45_channel_1_energy
    name: ev_daily_energy
    cycle: daily
    tariffs:
      - peak
      - offpeak
  monthly_energy:
    source: sensor.shellyem_c45bbee1cb45_channel_1_energy
    name: ev_monthly_energy
    cycle: monthly
    tariffs:
      - peak
      - offpeak

However when i go to put it on a card and do the next steps i am not getting a utility meter, instead im getting a selector ?

image

Quite confused and would appreciate assitance if anyone has encountered this before

Also when i then go to try to run my automation as to set the tarrif i get this error

The automation “Set Energy Tariff Based on Time” (automation.set_energy_tariff_based_on_time) has an action that calls an unknown service: utility_meter.select_tariff.

2 posts - 2 participants

Read full topic

How do I convert a sensor into an Integer using a Template?

$
0
0

Hello,

I have a bug in an integration where it doesn’t like a particular sensor, and says it is not an integer.

Someone else fixed that by, as they said, using a template. I have asked for detail, but no response.

Can anyone please tell me how I convert a sensor to an integer using a template?

thanks

4 posts - 4 participants

Read full topic

Disable web UI

$
0
0

Hi,

Is there a way to disable the web UI so Home Assistant can be accessed using the Websocket API only?

4 posts - 2 participants

Read full topic


ESP32 in both BTHome and ESPHome?

$
0
0

I am using Hassio with BTHome and ESPHome integrations. Selecting the ESPHome integration I see my three esp devices and they have an “Adopt” option. Should I do this? I believe they are part of the BTHome integration. If I do not, how do I keep the firmware updated?

I do not think I enabled encrypted ota. Might have during an upgrade, hard to remember. I have tried “Adopting” one of the devices, it wants to assign what seems to be a new encryption key, which I tried skipping and it fails to update, refusing the connection.

Trying not to be completely helpless,I have examined all the files I can think of. My secrets.yaml has an API key, I don’t see any entries for ota:

I don’t mind digging around, but what should I expect? And to the original point, should I have both BTHome and ESPHome running together? Is that best practices?

I came across this because one of the esp devices seems to be getting intermittent with it’s connection, which years ago if that happened, I would simply update the firmware to fix those kinds of things.

2 posts - 1 participant

Read full topic

Have a slightly broken automation that includes Xiaomi button and motion detector and many choices

$
0
0

So to get a couple of things out of the way…
HA version - 2024.5.3
Supervisor - 2024.05.1
Running bare metal install on Dell i5 micro system.

I have a fairly complex automation that controls lighting in our bathroom during various intervals of day and night and involves a motion detector. We have dogs and at night it is really dark getting from the dog crates to the front door, so I have deployed a Xiaomi button that I wish to override the motion detector with to activate many of the same lights plus a couple more. I would like to click the button to turn on the lights and then click again to turn them back off.

The problem is that if I get in range of the motion sensor it fires a motion event and due to the nature of the the Xiaomi button retaining the last click type state an event to shut off lights is triggered and should not be. I can see 2 possible ways to make it work. 1) not allow the motion sensor to trigger some how during the late night hours and only run with the button as a trigger. I am really not sure how to accomplish this option. 2) within the subsection of my automatin that takes the click input to turn on the lights have a sequence call that changes the “last click” event to something other than “single”, another thing that I am not sure how to do. I have figured out if I single click and the follow up with a double click that triggers nothing that the motion sensor trigger then does not cause the failure state, so I think option 2 may be the way to go.

I am including the whole automation and then will break out the relevant sections that are causing the problem. Fair warning… I am not the best automation writer and my format may be not the most efficient.

I have not imported this automation into the automation editor as it appears that comments contained within the automation are lost and I do not appear to be able to put them back in and have them visible? Is this something I am doing wrong?

Full automation:

- id: Bathroom_motion
  alias: Bathroom motion
  trigger:
    - platform: state
      entity_id: binary_sensor.motion_sensor_158d0001644ca3
      from:
        - 'off'
      to:  
        - 'on'
    - platform: event
      event_type: xiaomi_aqara.click
      event_data:
        entity_id: binary_sensor.switch_158d0001e5f29e
        click_type: "single"
    - platform: event
      event_type: xiaomi_aqara.click
      event_data:
        entity_id: binary_sensor.switch_158d0001e5f29e
        click_type: "hold"
  mode: queued
  max: 20
  action:
    - choose:
        - conditions:
    ##########  Motion to turn on lights during daytime  ##########
            - condition: template
              value_template: "{{ trigger.to_state.state == 'on' }}"
            - condition: time
              after: '06:00:00'
              before: '20:30:00'
            - condition: state
              entity_id: timer.bathroom_motion_short
              state: 'idle'
            - condition: state
              entity_id: timer.bathroom_motion_long
              state: 'idle'
            - condition: state
              entity_id: input_boolean.notify_bathroom_tag
              state: "off"
          sequence:
            - service: light.turn_on
              entity_id:  group.bathroom_lights
              data:
                brightness: 254
                kelvin: 5000
            - service: timer.start
              entity_id: timer.bathroom_motion_long
        - conditions:
    ##########  Motion to turn on lights early night 4000k  ##########
            - condition: template
              value_template: "{{ trigger.to_state.state == 'on' }}"
            - condition: time
              after: '20:30:00'
              before: '23:00:00'
            - condition: state
              entity_id: timer.bathroom_motion_short
              state: 'idle'
            - condition: state
              entity_id: input_boolean.notify_bathroom_tag
              state: "off"
            - condition: state
              entity_id: input_boolean.night_dog
              state: "off"
          sequence:
            - service: light.turn_on
              entity_id:  group.bathroom_lights
              data:
                brightness: 254
                kelvin: 4000
            - service: timer.start
              entity_id: timer.bathroom_motion_long
        - conditions:
    ##########  Motion to turn on lights night 3750k  ##########
            - condition: template
              value_template: "{{ trigger.to_state.state == 'on' }}"
            - condition: state
              entity_id:  timer.bathroom_heat_tag
              state: 'idle'
            - condition: state
              entity_id: input_boolean.notify_bathroom_tag
              state: 'off'
            - condition: time
              after: '23:00:00'
              before: '06:00:00'
            - condition: state
              entity_id: input_boolean.night_dog
              state: "off"
          sequence:
            - service: light.turn_on
              entity_id:  light.bathroom_1,light.toolbox,light.sink,light.tree_top
              data:
                brightness: 15
                kelvin: 3750
            - service: light.turn_on
              entity_id: light.computer_lamp
              data:
                brightness: 10
                kelvin: 3750
            - service: timer.start
              entity_id: timer.bathroom_motion_short
    ##########  1 click to turn off lights at night  ##########
        - conditions:
#            - condition: state
#              entity_id: timer.bathroom_motion_short
#              state: 'idle'
#            - condition: state
#              entity_id:  timer.bathroom_motion_long
#              state: 'active'
            - condition: state
              entity_id: binary_sensor.switch_158d0001e5f29e
              attribute: last_action
              state: single 
            - condition: time
              after: '23:00:00'
              before: '06:00:00'
            - condition: state
              entity_id: input_boolean.notify_bathroom_tag
              state: "off"
            - condition: state
              entity_id: input_boolean.night_dog
              state: "on"
          sequence:
            - service: timer.finish
              entity_id: timer.bathroom_motion_long
            - service: timer.finish
              entity_id: timer.bathroom_motion_short
            - service: input_boolean.turn_off
              entity_id: input_boolean.night_dog
            - service: light.turn_off
              entity_id: light.door,light.computer_lamp,light.tree_top,light.sink,light.toolbox
    ##########  1 click to turn on lights at night  ##########
        - conditions:
#            - condition: state
#              entity_id: timer.bathroom_motion_short
#              state: 'idle'
#            - condition: state
#              entity_id:  timer.bathroom_motion_long
#              state: 'idle'  
            - condition: time
              after: '23:00:00'
              before: '06:00:00'
            - condition: state
              entity_id: binary_sensor.switch_158d0001e5f29e
              attribute: last_action
              state: single
            - condition: state
              entity_id: input_boolean.notify_bathroom_tag
              state: "off"
            - condition: state
              entity_id: input_boolean.night_dog
              state: "off"
          sequence:
            - service: timer.finish
              entity_id: timer.bathroom_motion_short
            - service: timer.finish
              entity_id: timer.bathroom_motion_long
            - service: input_boolean.turn_on
              entity_id: input_boolean.night_dog
            - service: light.turn_on
              entity_id: light.bathroom_1,light.toolbox,light.sink,light.tree_top,light.computer_lamp
              data:
                brightness: 15
                kelvin: 3000
#            - service: timer.start
#              entity_id: timer.bathroom_motion_long
            - service: light.turn_on
              entity_id: light.door
              data:
                brightness: 254
              
    ##########  Hold to toggle lights at night  ##########
#        - conditions:
#            - condition: state
#              entity_id: binary_sensor.switch_158d0001e5f29e
#              attribute: last_action
#              state: hold
#            - condition: time
#              after: '22:30:00'
#              before: '06:00:00'
#          sequence:
#            - service: light.toggle
#              entity_id: light.door
###################################################

- id: Bathroom_long_timer_expired
  alias: Bathroom long timer expired
  trigger:
    - platform: event
      event_type: timer.finished
      event_data:
        entity_id: timer.bathroom_motion_long
  condition: 
    condition: template
    value_template: >
      {{ not is_state('timer.bathroom_heat_tag','active') }} 
  action:
  - service: light.turn_off
    entity_id: group.bathroom_lights,light.door
    
- id: Bathroom_short_timer_expired
  alias: Bathroom short timer expired
  trigger:
    - platform: event
      event_type: timer.finished
      event_data:
        entity_id: timer.bathroom_motion_short
  action:
    - choose:
        - conditions:
            - condition: time
              after: '06:00:00'
              before: '23:00:00'
            - condition: template
              value_template: >
                {{ not is_state('timer.bathroom_heat_tag','active') }}
          sequence:
            - service: light.turn_off
              entity_id: group.bathroom_lights
        - conditions:
            - condition: time
              after: '23:00:00'
              before: '06:00:00'
            - condition: template
              value_template: >
                {{ not is_state('timer.bathroom_heat_tag','active') }}
          sequence:
            - service: light.turn_off
              entity_id: group.bathroom_lights,light.tree_top,light.sink,light.computer_lamp

Sections that are causing the problem:
Lights turning on with click:

    ##########  1 click to turn on lights at night  ##########
        - conditions:
#            - condition: state
#              entity_id: timer.bathroom_motion_short
#              state: 'idle'
#            - condition: state
#              entity_id:  timer.bathroom_motion_long
#              state: 'idle'  
            - condition: time
              after: '23:00:00'
              before: '06:00:00'
            - condition: state
              entity_id: binary_sensor.switch_158d0001e5f29e
              attribute: last_action
              state: single
            - condition: state
              entity_id: input_boolean.notify_bathroom_tag
              state: "off"
            - condition: state
              entity_id: input_boolean.night_dog
              state: "off"
          sequence:
            - service: timer.finish
              entity_id: timer.bathroom_motion_short
            - service: timer.finish
              entity_id: timer.bathroom_motion_long
            - service: input_boolean.turn_on
              entity_id: input_boolean.night_dog
            - service: light.turn_on
              entity_id: light.bathroom_1,light.toolbox,light.sink,light.tree_top,light.computer_lamp
              data:
                brightness: 15
                kelvin: 3000
#            - service: timer.start
#              entity_id: timer.bathroom_motion_long
            - service: light.turn_on
              entity_id: light.door
              data:
                brightness: 254

Lights turning off with click and being screwed up by the “last action” state of the button and motion activation as a main trigger.

    ##########  1 click to turn off lights at night  ##########
        - conditions:
#            - condition: state
#              entity_id: timer.bathroom_motion_short
#              state: 'idle'
#            - condition: state
#              entity_id:  timer.bathroom_motion_long
#              state: 'active'
            - condition: state
              entity_id: binary_sensor.switch_158d0001e5f29e
              attribute: last_action
              state: single 
            - condition: time
              after: '23:00:00'
              before: '06:00:00'
            - condition: state
              entity_id: input_boolean.notify_bathroom_tag
              state: "off"
            - condition: state
              entity_id: input_boolean.night_dog
              state: "on"
          sequence:
            - service: timer.finish
              entity_id: timer.bathroom_motion_long
            - service: timer.finish
              entity_id: timer.bathroom_motion_short
            - service: input_boolean.turn_off
              entity_id: input_boolean.night_dog
            - service: light.turn_off
              entity_id: light.door,light.computer_lamp,light.tree_top,light.sink,light.toolbox

The timer finish in the above kills the lights in the bathroom that may have been triggered by the motion sensor and then the lights that are triggered by the button press are turned off as well.

I am really hoping that someone will see something that I have overlooked… I have been beating my head for way to long to attempt to figure this little but out in this automation. I have left test code in place commented out as well.

Thanks Matt

3 posts - 2 participants

Read full topic

Command Batching Matter 1.3

$
0
0

Just saw we got the update , and wanted to ask how i can make use of the new Command Batching feature ?

“* Command Batching — A Matter controller can now batch multiple commands into a single message when communicating with Matter devices to minimize the delay between the execution of those commands. For example, when used with a Matter bridge, batched commands can affect multiple devices allowing the bridge to provide a more synchronized experience. Common examples include minimizing the “popcorn effect” sometimes seen in smart lighting applications.”

1 post - 1 participant

Read full topic

Response error 500 - Can't edit automation

$
0
0

I can edit other automations and create new ones, but this one can’t be edited:

alias: Fernseher xxx
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.time_remaining
    to: "0.0"
    id: ZeitWeg
  - platform: numeric_state
    entity_id:
      - sensor.time_remaining
    above: 0
    id: ZeitDa
  - platform: time
    at: "06:00:00"
    id: ZeitDaUhr
  - alias: Gute-Nacht-Alarm ist jetzt
    platform: template
    value_template: >-
      {{ states('time.bedtime_alarm') < now().timestamp() |
      timestamp_custom('%H:%M:%S') }}
    id: ZeitWeg
  - alias: Fernseher Laufzeit größer als Spielzeit
    platform: template
    value_template: >-
      {{states.sensor.fernseher_xxx_laufzeit.state|float>states.input_number.ursprungszeit.state|float+9/60}}
    id: ZeitWeg
  - platform: state
    entity_id:
      - time.bedtime_alarm
    id: ZeitDa
  - platform: state
    entity_id:
      - switch.alarms_enabled_today
    to: "on"
    id: ZeitWeg
  - platform: state
    entity_id:
      - switch.alarms_enabled_today
    to: "off"
    id: ZeitDa
  - platform: time
    at: "14:30:00"
    id: ZeitDaUhr
  - platform: state
    entity_id:
      - person.xxx
    to: not_home
    id: Abwesend
  - platform: state
    entity_id:
      - device_tracker.gast
    to: not_home
    id: Abwesend
  - platform: state
    entity_id:
      - person.xxx
    to: home
    id: ZeitDaUhr
  - platform: state
    entity_id:
      - device_tracker.gast
    to: home
    id: ZeitDaUhr
  - platform: state
    entity_id:
      - time.bedtime_alarm
    id: ZeitberechnungAn
  - platform: numeric_state
    entity_id:
      - number.xxxs_switch_play_time_limit
    above: 0
    id: ZeitberechnungAn
condition:
  - condition: or
    conditions:
      - condition: and
        conditions:
          - condition: trigger
            id:
              - ZeitWeg
          - condition: state
            entity_id: switch.alarms_enabled_today
            state: "on"
          - condition: or
            conditions:
              - condition: template
                value_template: >-
                  {{ states('time.bedtime_alarm') < now().timestamp() |
                  timestamp_custom('%H:%M:%S') }}
                alias: Gute Nacht Alarm überschritten
              - alias: Weder Schulfrei noch Wochenende
                condition: and
                conditions:
                  - condition: state
                    entity_id: binary_sensor.arbeitstag_heute_sensor
                    state: "on"
                  - condition: state
                    entity_id: binary_sensor.schulfrei_xxx_heute
                    state: "off"
                  - condition: or
                    conditions:
                      - condition: state
                        entity_id: sensor.time_remaining
                        state: "0.0"
                      - condition: template
                        value_template: >-
                          {{states.sensor.fernseher_xxx_laufzeit.state|float>states.input_number.ursprungszeit.state|float+9/60}}
                        alias: Fernseher Laufzeit größer als Spielzeit
      - condition: and
        conditions:
          - condition: trigger
            id:
              - ZeitDa
              - ZeitDaUhr
          - condition: or
            conditions:
              - condition: and
                conditions:
                  - condition: template
                    value_template: >-
                      {{ states('time.bedtime_alarm') > now().timestamp() |
                      timestamp_custom('%H:%M:%S') }}
                    alias: Gute Nacht Alarm ist noch nicht
                  - condition: or
                    conditions:
                      - condition: numeric_state
                        entity_id: sensor.time_remaining
                        above: 0
                      - condition: state
                        entity_id: binary_sensor.arbeitstag_heute_sensor
                        state: "off"
                      - condition: state
                        entity_id: binary_sensor.schulfrei_xxx_heute
                        state: "on"
                      - condition: and
                        conditions:
                          - condition: trigger
                            id:
                              - ZeitDaUhr
                          - condition: or
                            conditions:
                              - condition: and
                                conditions:
                                  - condition: time
                                    after: "06:00:00"
                                  - condition: or
                                    conditions:
                                      - condition: state
                                        entity_id: binary_sensor.arbeitstag_heute_sensor
                                        state: "off"
                                      - condition: state
                                        entity_id: binary_sensor.schulfrei_xxx_heute
                                        state: "on"
                              - condition: time
                                after: "14:30:00"
                  - condition: time
                    after: "06:00:00"
              - condition: state
                entity_id: switch.alarms_enabled_today
                state: "off"
      - condition: and
        conditions:
          - condition: trigger
            id:
              - Abwesend
          - condition: state
            entity_id: person.xxx
            state: not_home
          - condition: state
            entity_id: device_tracker.gast
            state: not_home
      - alias: Zeitberechnung
        condition: and
        conditions:
          - condition: trigger
            id:
              - ZeitberechnungAn
          - condition: time
            after: "06:00:00"
          - condition: numeric_state
            entity_id: number.xxxs_switch_play_time_limit
            above: 0
          - condition: state
            entity_id: binary_sensor.arbeitstag_heute_sensor
            state: "on"
          - condition: state
            entity_id: binary_sensor.schulfrei_xxx_heute
            state: "off"
          - condition: state
            entity_id: binary_sensor.arbeitstag_morgen_sensor
            state: "on"
          - condition: state
            entity_id: binary_sensor.schulfrei_xxx_morgen
            state: "off"
action:
  - if:
      - condition: trigger
        id:
          - ZeitWeg
          - Abwesend
    then:
      - if:
          - alias: Fernseher Laufzeit größer als Spielzeit
            condition: template
            value_template: >-
              {{states.sensor.fernseher_xxx_laufzeit.state|float>states.number.xxxs_switch_play_time_limit.state|int/60}}
          - condition: not
            conditions:
              - condition: state
                entity_id: number.xxxs_switch_play_time_limit
                state: "0.0"
              - condition: trigger
                id:
                  - Abwesend
          - condition: template
            value_template: >-
              {{ states('time.bedtime_alarm') > now().timestamp() |
              timestamp_custom('%H:%M:%S') }}
        then:
          - service: notify.matrix_xxx_mit
            data:
              message: Deine heutige Fernseh- und Spielzeit ist abgelaufen.
          - if:
              - condition: numeric_state
                entity_id: sensor.fernseher_xxx_gesamt_power
                above: 25
            then:
              - service: tts.google_translate_say
                metadata: {}
                data:
                  cache: false
                  language: de
                  entity_id: media_player.xxx_panasonic_viera_tv
                  message: Deine Heutige Medienzeit ist aufgebraucht
          - service: notify.matrix_xxx_log
            data:
              message: >-
                Fernseher lief länger als die heutige erlaubte Spielzeit, daher
                Fernseher ausgeschaltet und Spielzeit auf 0 gesetzt
          - service: number.set_value
            metadata: {}
            data:
              value: "0"
            target:
              entity_id: number.xxxs_switch_play_time_limit
        else:
          - if:
              - condition: template
                value_template: >-
                  {{ states('time.bedtime_alarm') < now().timestamp() |
                  timestamp_custom('%H:%M:%S') }}
              - condition: numeric_state
                entity_id: sensor.fernseher_xxx_gesamt_power
                above: 25
              - condition: trigger
                id:
                  - ZeitWeg
            then:
              - service: tts.google_translate_say
                metadata: {}
                data:
                  cache: false
                  language: de
                  entity_id: media_player.xxx_panasonic_viera_tv
                  message: Gute Nacht xxx
      - if:
          - condition: numeric_state
            entity_id: sensor.fernseher_xxx_gesamt_power
            above: 25
        then:
          - type: turn_off
            device_id: aa23d3d4ee95cd8099c46692a0cb93fb
            entity_id: 3d3663f22a67dcde2dfdc807515a9c06
            domain: remote
          - parallel:
              - wait_for_trigger:
                  - platform: state
                    entity_id:
                      - binary_sensor.fernseher_xxx
                    to: "off"
                continue_on_timeout: true
                timeout:
                  hours: 0
                  minutes: 1
                  seconds: 0
                  milliseconds: 0
              - repeat:
                  sequence:
                    - type: turn_off
                      device_id: aa23d3d4ee95cd8099c46692a0cb93fb
                      entity_id: 3d3663f22a67dcde2dfdc807515a9c06
                      domain: remote
                    - delay:
                        hours: 0
                        minutes: 0
                        seconds: 5
                        milliseconds: 0
                  until:
                    - condition: state
                      entity_id: binary_sensor.fernseher_xxx
                      state: "off"
      - type: turn_off
        device_id: 7bf17e809693585372f655e2056c2995
        entity_id: 22a45935c24a2e087713ba1306c0d062
        domain: switch
      - if:
          - condition: trigger
            id:
              - ZeitWeg
        then:
          - service: automation.turn_off
            metadata: {}
            data:
              stop_actions: true
            target:
              entity_id: automation.xxx_zeitberechnung
    else:
      - if:
          - condition: trigger
            id:
              - ZeitDa
              - ZeitDaUhr
        then:
          - if:
              - condition: state
                entity_id: person.xxx
                state: home
            then:
              - type: turn_on
                device_id: 7bf17e809693585372f655e2056c2995
                entity_id: 22a45935c24a2e087713ba1306c0d062
                domain: switch
          - if:
              - condition: trigger
                id:
                  - ZeitDaUhr
            then:
              - alias: Spielzeit einstellen
                if:
                  - condition: or
                    conditions:
                      - condition: state
                        entity_id: binary_sensor.arbeitstag_heute_sensor
                        state: "off"
                      - condition: state
                        entity_id: binary_sensor.schulfrei_xxx_heute
                        state: "on"
                      - condition: state
                        entity_id: binary_sensor.arbeitstag_morgen_sensor
                        state: "off"
                      - condition: state
                        entity_id: binary_sensor.schulfrei_xxx_morgen
                        state: "on"
                      - condition: not
                        conditions:
                          - condition: and
                            conditions:
                              - condition: time
                                before: "14:30:00"
                              - condition: state
                                entity_id: binary_sensor.schulfrei_xxx_heute
                                state: "off"
                              - condition: state
                                entity_id: binary_sensor.arbeitstag_heute_sensor
                                state: "on"
                then:
                  - service: number.set_value
                    metadata: {}
                    data:
                      value: "-1"
                    target:
                      entity_id: number.xxxs_switch_play_time_limit
                  - service: input_number.set_value
                    metadata: {}
                    data:
                      value: 18
                    target:
                      entity_id: input_number.ursprungszeit
                  - if:
                      - condition: time
                        before: "10:00:00"
                    then:
                      - service: notify.matrix_xxx_log
                        data:
                          message: >-
                            xxxs heutige Spiel- und Fernsehzeit ist auf
                            unbegrenzt bis {{states("time.bedtime_alarm")}} Uhr
                            eingestellt.
                      - wait_for_trigger:
                          - platform: time
                            at: "10:00:00"
                        continue_on_timeout: true
                        timeout:
                          hours: 4
                          minutes: 0
                          seconds: 0
                          milliseconds: 0
                  - service: notify.matrix_xxx_mit
                    data:
                      message: >-
                        Deine heutige Spiel- und Fernsehzeit ist unbegrenzt bis
                        {{states("time.bedtime_alarm")}} Uhr.
                else:
                  - if:
                      - condition: time
                        after: "14:30:00"
                    then:
                      - service: number.set_value
                        metadata: {}
                        data:
                          value: "180"
                        target:
                          entity_id: number.xxxs_switch_play_time_limit
                      - service: input_number.set_value
                        metadata: {}
                        data:
                          value: 3
                        target:
                          entity_id: input_number.ursprungszeit
                      - service: notify.matrix_xxx_mit
                        data:
                          message: >-
                            Deine heutige Spiel- und Fernsehzeit ist
                            {{states("input_number.ursprungszeit")}} Stunden bis
                            {{states("time.bedtime_alarm")}} Uhr.
                      - service: automation.turn_on
                        metadata: {}
                        data: {}
                        target:
                          entity_id: automation.xxx_zeitberechnung
                        enabled: true
                enabled: true
          - wait_for_trigger:
              - platform: numeric_state
                entity_id:
                  - sensor.fernseher_xxx_gesamt_power
                above: 30
            continue_on_timeout: true
            timeout:
              hours: 0
              minutes: 1
              seconds: 0
              milliseconds: 0
          - repeat:
              sequence:
                - type: turn_off
                  device_id: aa23d3d4ee95cd8099c46692a0cb93fb
                  entity_id: 3d3663f22a67dcde2dfdc807515a9c06
                  domain: remote
              until:
                - condition: numeric_state
                  entity_id: sensor.fernseher_xxx_gesamt_power
                  below: 25
        else:
          - if:
              - condition: trigger
                id:
                  - ZeitberechnungAn
            then:
              - service: automation.turn_on
                metadata: {}
                data:
                  stop_actions: true
                target:
                  entity_id: automation.xxx_zeitberechnung
              - service: notify.matrix_xxx_log
                data:
                  message: >-
                    Gute Nacht Alarm verändert, daher Zeitberechnung wieder
                    eingeschaltet.
mode: single

6 posts - 4 participants

Read full topic

One Velux Windows not more connected

$
0
0

Hello everyone,
I have installed the Homekit and all windows and shutters can be controlled with it. After about a month, one window (“office”) in HA no longer works and can no longer be addressed. With the Velux remote control it works without any problems (windows and shutters). The entire Velux system is linked via Velux Gateway Netatmo.
As this works without any problems via the Velux remote control, it must be due to HA.
Now to the question: How can I delete the identity cover:velux_window_roof_windows? In the print screen the “Delete” is gray, cannot be deleted. Or do I have to uninstall and reinstall the whole Homekit? Does anyone have a system like this in use?
Many thanks for your help!!!

1 post - 1 participant

Read full topic

Viewing all 105968 articles
Browse latest View live


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