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

Resetting a template sensor annually

$
0
0

A few years ago this community helped me refine the following template to capture the daily outdoor high and low temperatures:

Working daily hi/low template (click for more details)

I’m trying to modify this format to reset annually (Jan 1st at midnight). I have been looking at the documentation for templates, automatons, and triggers for the last couple days. I’m not seeing an obvious solution to this.

I have tried:

- trigger:
  - platform: time
    at:
      month: 01
      day: 01
      hour: 00
      day: 00

This results in the error message Expected HH:MM, HH:MM:SS, an Entity ID with domain 'input_datetime' or 'sensor', a combination of a timestamp sensor entity and an offset, or Limited Template

After further reviewing the documentation, that does make sense. This format does not match any of those expected formats.

The only method I can come up with to accomplish this is to use a local calendar event set to reoccur on Jan 1st of every year and use that event to trigger the reset. I have not tried to set this up yet.

I appreciate any suggestions

8 posts - 3 participants

Read full topic


Raspberry Cooler/Led

$
0
0

Hello, how are you? Can you recommend an integration to control the coolers on the Raspberry Pi 4B? Is it possible? Right now, I don’t have a cooler—I installed an external one—but I’m planning to integrate one in its proper place and would like it to turn on and off according to the temperature. Is that possible? Also, is there an integration or method to turn off the LEDs?

Thanks in advance!

1 post - 1 participant

Read full topic

Monitor and reduce memory usage by HA voice assistant

$
0
0

Hi there,

what are good practices and tools to…

a) monitor ram usage of certain integrations/addons (specifically but not limited to voice assistant)?
b) reduce (or even limit) ram usage of voice assistant? e.g. would a reduction of exposed entities help?

I know this is fairly new, but I wonder if there is a good source out there with some benchmarks and numbers. But any educated guess is also welcome :slight_smile:

Thanks!

1 post - 1 participant

Read full topic

Show daily electricity consumption in Grafan as a bar chart

$
0
0

hello everyone,

I would like to display my electricity consumption daily in Grafana as a bar chart.

The data is available in HA in InfluxDB 1.x.

In Grafana, I defined the following query using GrafanaQL:

Query A:

SELECT (last(“value”) - first(“value”)) * -1 AS “Einspeisung”
FROM “Wh”
WHERE “entity_id” = ‘iometer_gesamteinspeisung’
AND $timeFilter
GROUP BY time(1d)
fill(previous)
tz(‘Europe/Berlin’)

Query B:

SELECT (last(“value”) - first(“value”)) AS “Bezug”
FROM “Wh”
WHERE “entity_id” = ‘iometer_gesamtbezug’
AND $timeFilter
GROUP BY time(1d)
fill(previous)
tz(‘Europe/Berlin’)

The time interval is set to seven days:

In principle, all values ​​except the oldest are displayed correctly.

What can I do to ensure that the first value is also displayed correctly?

Thanks in advance for your support.

1 post - 1 participant

Read full topic

Dreo local

$
0
0

hello, summer is approaching and even though there is snow today in Co Springs, it will get hot soon. last year i made the mistake of bricking my Dreo DR-HTF001S by using a walkthrough that specifically told me not to. (who knew) but it does offer the steps they went through to completely make one of the fans local and be able to use with esphome.

really just putting this post out there, i can still upload esphome files to the DR-HTF001S i just don’t have the appropriate commands and keys for it… (who knew)… if anyone happens to adapt this for the 1S (cruiser) please share your esphome yaml so that i may make my fan smart again. thanks in advance!

1 post - 1 participant

Read full topic

High internet usage (hourly spikes)

$
0
0

I need some help figuring out why my home assistance instance (HASS OS VM) is using so much data.

I recently acquired a unifi UCG Ultra which gives me a pretty detailed breakdown of traffic flows in/out of my network. While looking at the dashboards I found that my HASS instance is the #1 traffic user on my network, by far.

Now like many of you here I do have a crippling Home Assistant addiction but I was not expecting that much traffic. How do I go about finding out what is causing this? My initial thought was CCTV cameras or something like that, it peaks every 45 minutes to 1 hour.

I don’t run anything “on top” that I can think of (for e.g. speedtests, frigate etc) that could be causing this (

Below is a breakdown.

Each time it “peaks”, it downloads about 1GB of data:

Here is a list of integrations I am running: Bitwarden Send

I can’t see anything in this list that would connect to an internet URL every every hour and download 1 GB of data.

2 posts - 2 participants

Read full topic

Which plugs?

SONOFF ZBMINIR2 Detached Mode and Double Click

$
0
0

Hello my friends:
I am Ruben from Spain.
Using Some ZBMINIR2 with zb2mqtt
I am using with detach relay mode ON becouse i want use pulsation for some more actions like double click.
I can see pulsation on relay like a “toggle” action on the ZBMINIR2 device.
How can i have double click with this device?
Thank’s a lot.
My question is:

1 post - 1 participant

Read full topic


Meross devices have to be re added after losing connection

$
0
0

I am using Meross devices. They are the homekit version but I’ve started adding them to the Meross app as non homekit devices. Once added in the meross app I they show up in home assistant as homekit devices. Every once and a while a switch will loose connection and I’ll find it blinking which means it is ready for configuration. I’d love to solve that problem but what I’m posting about is when I add the switch back in the Meross app why would it still not be recognized in home assistant? I have to delete and add it again which wipes out all of my automations and configuration. Is there something I can do differently so that the device is recognized as the same device as before and picks up where it left off?

1 post - 1 participant

Read full topic

Can't Display a Dynamic Photo Depending on time of day

$
0
0

Hello!

I am trying to display an image that is time of day dependant. So far I have been unsuccessful, and I am hoping someone knows of a way accomplish it.

Here is the yaml for my sensor I created, that includes a template to decipher which photo to display depending on time of day:

dynamic_image:
  friendly_name: "Dynamic Image"
  value_template: >
    {% set now_time = now().time() if now() is not none else as_datetime('00:00').time() %}
    {% set today = now().weekday() if now() is not none else 0 %}
    {% set morning_times = {
        0: ('01:40', '05:45'),
        1: ('01:40', '05:45'),
        2: ('01:40', '05:45'),
        3: ('01:40', '05:45'),
        4: ('01:40', '05:45'),
        5: ('01:40', '05:15'),
        6: ('01:45', '07:20')
    } %}
    {% set start_time, end_time = morning_times[today] %}
    {% if now_time >= as_datetime('1970-01-01 ' ~ start_time).time() and now_time <= as_datetime('1970-01-01 ' ~ end_time).time() %}
      /local/images/image1.png
    {% else %}
      /local/images/image2.png
    {% endif %}

and here is the picture-elements card yaml I have tried using, with numerous variants of the sensor:

- type: picture-elements
  image: ${states['sensor.dynamic_image'].state}
  style:
    background-color: transparent
  elements:
    - type: state-label
      entity: sensor.dynamic_image_sensor
      style:
        top: 51%
        left: 50%
        color: white
        font-size: 15px
      card_mod:
        style: |
          ha-card {
            --ha-card-background: rgba(0,0,0,0) !important;
          }

1 post - 1 participant

Read full topic

How to self-reboot on ZHA failure on VM

$
0
0

I have HA running in a VirtualBox VM. I have a USB passthru on a Zigbee/Z-Wave combo dongle. I had to set it to USB 1.1 passthru or it was super unreliable. Even with all that, the USB passthru stops working like every 7-10 days and all Zigbee stops working. So my questions are as follows:

  1. What entity/trigger do I use to detect a ZHA add-on failure?
  2. How do I make HA self-reboot on that? And like a full hardware (container) reboot not just the standard restart but a reboot. The reason for this is that a standard restart doesn’t typically bring it back. Actually, even a reboot sometimes won’t but it’s at least something.
  3. I also need a way to detect when the last reboot was (or even a way to keep a count/history) so it doesn’t keep rebooting over and over if it doesn’t bring back ZHA

In the absence of all that not working, I’d love a way to get the container restarted from outside virtual box. I have some ideas like if the reboot doesn’t bring back ZHA I could do a full shutdown. Then using a script on the host I can then have it restart the VM.

I think if it keeps doing this I’ll eventually have to get that external IP-based Zigbee bridge but I’m afraid of losing all my device configs. I know there’s a way of keeping it but I don’t want the headache just yet unless I have to.

2 posts - 2 participants

Read full topic

Automation needs to periodically check if conditions are met during time period

$
0
0

I am new to Home Assistant but I’ve been pleasantly surprised at how easy at has been to get all of my devices set up and automated.
I have a Home Assistant Green with OS version 15.2, Core 2025.4.3.

I have created many automations, scripts and scenes for various devices but I am stuck trying to automate my air conditioning system.

I have created automations for both heating and cooling that have start and end times and with conditions for the current temperature outside and inside to be met. I can make that part work.

The problem I have is where the conditions are not met at the start time, I need the automation to keep checking those conditions periodically so that the AC turns on when they are met.

I have searched the forum and google many times but I have struggled to find an answer that seemed relevant or that I could understand. At one point I found a reference to a Repeat Until variable that I have added to my automation but it doesn’t seem to have had any effect. Maybe I’m not using it correctly.

My preference is to use the UI to set up the automations and my understanding of YAML is close to zero, so that is also making it hard to find an answer I think.
This is my Automation for Cooling so far:

alias: AC Cooling
description: Turn on AC Cooling if Temp above 24
triggers:
  - event: start
    trigger: homeassistant
  - at: "12:00:00"
    trigger: time
  - at: "23:00:00"
    trigger: time
conditions:
  - type: is_temperature
    condition: device
    device_id: 4cfa8550e4cfad042f89d45a354147c1
    entity_id: b54ce541d02b7746d314f21b1cf303d4
    domain: sensor
    above: 26
  - condition: and
    conditions:
      - type: is_temperature
        condition: device
        device_id: 4cfa8550e4cfad042f89d45a354147c1
        entity_id: b54ce541d02b7746d314f21b1cf303d4
        domain: sensor
        above: 26
      - condition: or
        conditions:
          - condition: numeric_state
            entity_id: climate.ac_living_kitch
            above: 24.8
            attribute: current_temperature
          - condition: numeric_state
            entity_id: climate.ac_wayne_s_bed
            above: 24.8
            attribute: current_temperature
actions:
  - repeat:
      sequence:
        - choose:
            - conditions:
                - condition: time
                  after: "12:00:00"
                  before: "23:00:00"
              sequence:
                - action: scene.turn_on
                  metadata: {}
                  data: {}
                  target:
                    entity_id: scene.ac_cooling_default
          default:
            - device_id: 3f0c27a4da710809b6d2b5416976f33d
              domain: climate
              entity_id: 89ffbea87e57c381734e9568a6c5113b
              type: set_hvac_mode
              hvac_mode: "off"
      until:
        - condition: and
          conditions:
            - type: is_temperature
              condition: device
              device_id: 4cfa8550e4cfad042f89d45a354147c1
              entity_id: b54ce541d02b7746d314f21b1cf303d4
              domain: sensor
              above: 26
            - condition: or
              conditions:
                - condition: numeric_state
                  entity_id: climate.ac_living_kitch
                  above: 24.8
                  attribute: current_temperature
                - condition: numeric_state
                  entity_id: climate.ac_wayne_s_bed
                  above: 24.8
                  attribute: current_temperature
mode: single

To summarise what I’m trying to achieve:

Start time: 12:00
End Time: 23:00
If outside temperature is above 26
and either
climate.ac_living_kitch is above 24.8
climate.ac_wayne_s_bed is above 24.8
Then
Turn on Scene scene.ac_cooling_default

My current attempts result in either the cooling mode being activated at the start time if the conditions are met or else it never activates.

I’d really appreciate any help that can be offered. Thanks.

4 posts - 3 participants

Read full topic

Information architecture and navigation - I would like some recommendations

$
0
0

So I’ve been working on setting things up over the last 3-4 week or so. We’ve got automation related to main bedrom, kids room, living room and the entrance. So far so good.

Up until now I’ve made new dashboards and navigated between them via the menu. But I can see that it’s a friction for wife and kids when using the companion app, because the menu is hidden. So now I’m considering taking over the responsibility for the navigation via buttons or similar inside of the dashboard.

I’ve been researching typical navigation in HA and found different examples, but I’m not quite sure which direction to go. These are the elements I’ve come across.

  • Home page: little or no data shown, only buttons to go to the dashboard of each room. I’d definitely would like to start with something like that.
  • I’ve seen examples of sticky menu at the bottom
  • I’ve seen examples of using tabs inside a single dashboard, with sections showing according to pressed button.

To start simple my questions are:

How do you implement your house in HA? Is every room a dashboard or do you use a single dashboard (house) and then tabs at the top for each room?

If using dashboards for each room, in a room dashboard, what navigation do you prefer to include? Buttons to quickly cross navigate to the other rooms or a back button to navigate to Home page, and then go to the next room from there? The latter is easier to implement, but requires more taps. The former requires being able to show the same navigation on several dashboards, which is a challenge in itself(?)

Thank you for your input!

4 posts - 2 participants

Read full topic

Z-wave not starting after update to HAOS 15.2 and Core 15.4.3

$
0
0

Hi everyone.

Had a running z-wave installation before (z-wave js ui - latest version) and then decided to update to HAOS 15.2 and after that to Core 15.4.3.

Now the z-wave add-on doesn’t start anymore.
Got error message ‚failed to connect to host core-zwave-js:3000 …‘
Do I have to change any settings after the updates?
No z-wave devices are available in HA.
In z-wave js ui I can see them though. Controller seems up and running (at least that is what z-wave js ui shows me).

Any hints are highly appreciated.
Thanks in advance.

1 post - 1 participant

Read full topic

I can not filter the entities

$
0
0

Gefiltert nach Konfigurationseintrag 01JS7TZX9TE6W88RVTE32C5M92

This was shown ( German )

How I can get the filter back ?

1 post - 1 participant

Read full topic


Dynamic input_number icon depending on sensor state?

$
0
0

Hi,

I’m trying to change icon for an input_number helper depending on a sensor state, but so far having no luck with it. I found good working solutions to do it for sensors, but struggling with input_number.

My current code doesn’t produce any icon at all, so wonder if somebody could either offer a solution or at least point me in the right direction. I’m new to homeassistant so don’t fully understand how it all works under the hood.
Ideally I’d like to do it in vanilla without using any card mods etc.

This is what I have at the moment in customize.yaml

  input_number.newvol:
    templates:
    icon: |
          {% if is_state("sensor.matt_audio_default_device_muted", "False") %}
            mdi:volume-high
          {% else %}
            mdi:volume-mute
          {% endif %}

any help will be greatly appreciated

1 post - 1 participant

Read full topic

Help with dict formatting going wrong

$
0
0

I have a trigger template which has been nicely keeping a log of browser_users for several months but has recently started going wrong when HA restarts. After updating HA this morning I discovered that the attribute which normally stores the database as a dict has changed to a string. Can anyone help me understand why, and either how to prevent it or spot the error and convert the string back to a dict?
The attribute normally looks like this:

database:
  rnli0020:
    id: RNLI0020
    user: RNLI
    prev: "2025-04-16T02:04:03"
    when: "2025-04-19T11:21:32"
    for: 292649
    vizes: 1
    status: uv  +292649
    width: "980"
    old: "prev:2025-04-16T01:03:46 for:0 vizes:1 status:vu "
  gig9850davidc:
    id: Gig9850DavidC
    user: gig David C app
    prev: "2025-04-19T11:28:22"
    when: "2025-04-19T11:29:00"
    for: 53
    vizes: 2
    status: "vh "
    width: "412"
    old: prev:2025-04-19T11:27:29 for:53 vizes:1 status:hv  +53

But after HA restart, looks like this:

database: >-
  {'rnlia762': {'id': Undefined, 'user': '', 'prev': '', 'when':
  '2025-04-20T07:53:41', 'for': 0, 'vizes': 0, 'status': 'u', 'width': '',
  'old': ''}, 'rnli9atonyphone': {'id': 'RNLI9aTonyPhone', 'user': 'RNLI',
  'prev': '2025-04-19T23:18:36', 'when': '2025-04-20T08:11:32', 'for': 99,
  'vizes': 2, 'status': 'vh ', 'width': '980', 'old': 'prev:2025-04-19T23:16:57
  for:99 vizes:1 status:hv  +99'}, 'rnli961b': {'id': 'RNLI961b', 'user':
  'RNLI', 'prev': '2025-04-18T07:41:55', 'when': '2025-04-19T17:13:20', 'for':
  1458, 'vizes': 6, 'status': 'vv ', 'width': '1272', 'old':
  'prev:2025-04-17T16:56:06 for:1458 vizes:5 status:vv '}

My sensor code is:

  - trigger:
    - platform: state
      entity_id: 
        - sensor.browser_users_last_state_viz
      not_to: 
        - "unavailable"
        - "unknown"
        - 'none'
    sensor:
      - name: browser_users_db_viz
        unique_id: browser_users_db_viz
        state: "{{ trigger.to_state.state }}" 
        attributes:
          database: >
            {#- set this = states.sensor.browser_users_db_viz #}
            {#- set trig =  states('sensor.browser_users_last_state_viz') #} {# uncomment / swap for use in Developer Tools #}
            {%- set trig = trigger.to_state.state %}
            {%- set id = trig.split(' /')[-2] if ' /' in trig else trig %}
            {%- set ids = 'sensor.' ~ id | slugify ~ '_browser_user' %}
            {%- set idw = 'sensor.' ~ id | slugify ~ '_browser_width' %}
            {%- set db = dict(this.attributes.get('database', {}).items() | selectattr('0', 'eq', id)) if this.attributes.database.items is defined else {} %}
            {%- set others = dict(this.attributes.get('database', {}).items() | rejectattr('0', 'eq', id)) if this.attributes.database.items is defined else {} %}
            {%- set ids, who, old, name = 'sensor.' ~ id | slugify ~ '_browser_user', '', '', '' %}
            {%- set when = trig.split(';')[1] if ';' in trig else as_timestamp(now())|timestamp_custom('%Y-%m-%dT%H:%M:%S') %}
            {%- set status = trig.split(' /')[1] if ' /' in trig else 'n' %}
            {%- set status = status.split(';')[-2] if ';' in status else status %}
            {%- set triggerviz, previz, vizes = status, 'n', 0 %}
            {%- if states(ids) not in ('unavailable', 'none', 'unknown') %}
              {%- set who = states(ids) %}
              {%- if states[ids].last_changed not in ( 'none', 'unknown', 'unavailable') %}
                {%- set when = as_timestamp(states[ids].last_changed)|timestamp_custom('%Y-%m-%dT%H:%M:%S') %}
              {%- endif %}
            {%- endif %}
            {%- set width = states[idw].state if states[idw].state not in ( 'none', 'unknown', 'unavailable') else '' %}
            {%- set name = states[ids].name.split(' Browser')[-2] %}
            {%- set prev, dur = '', 0 %}
            {%- set usr  = who %}
            {%- if db[id] != undefined %}
              {%- set prev =  db[id].when if db[id].when != undefined else '' %}
              {%- set dur = db[id].for | int(0) if db[id].for != undefined else 0 %}
              {%- set usr  = db[id].user if db[id].user not in (undefined, null, '') else usr %}
              {%- set width  = db[id].width if db[id].width not in (undefined, null, '') else width %}
              {%- set previz =  db[id].status[0] if db[id].status != undefined else previz %}
              {%- set vizes =  db[id].vizes|int if db[id].vizes != undefined else vizes %}
              {%- set status = status~previz~' ' %}
              {%- set old = 'prev:' ~ db[id].prev ~ ' for:' ~ db[id].for ~ ' vizes:' ~ db[id].vizes ~ ' status:'~ db[id].status %}
            {%- endif %}
            {%- set inc = (as_timestamp(when, as_timestamp(now())) - as_timestamp(prev, 0)) | round(0) %}
            {%- if previz == 'v' and triggerviz in ('u','h') %}
              {%- set dur = max(dur + inc, 0) %}
              {%- set status = status~' +'~inc %}
            {%- endif %}
            {%- set vizes = vizes + 1 if triggerviz == 'v' else vizes %}
            {%- set new = {id: {'id': name, 'user': usr, 'prev': prev, 'when': when, 'for': dur, 'vizes': vizes, 'status': status, 'width': width, 'old':old }} %}
            {%- if previz=='n' or ('v' in (previz, triggerviz) and inc >= 1) %} 
              {#- new record or was/is visible AND time has elapsed #}
              {{ dict(new, **others) }}
            {%- else %}
              {#- moving between hidden & unavailable OR <1 sec between triggers, leave the database unchanged #}
              {{ dict(db, **others) }}
            {%- endif %}

And the sensor used to trigger it:

  - sensor:
    - name: browser_users_last_state_viz
      unique_id: browser_users_last_state_viz
      state: >
         {% set lastone = states.sensor | selectattr('entity_id', 'search', '_browser_visibility$')| rejectattr('entity_id','contains','dji') | rejectattr('entity_id','contains','station') | sort(attribute='last_changed') | last | default %} {# #}
         {% set trig = lastone.entity_id.split('_browser')[-2].split('sensor.')[1] ~' /'~ lastone.state[0] ~';'~lastone.last_changed.isoformat()[0:19] if lastone and lastone.entity_id is not undefined else 'none' %} 
         {{ trig }}

1 post - 1 participant

Read full topic

ZHA drops all devices

$
0
0

I have been using Home Assistant for a few years, but never managed to get Zigbee completely stable. My house has 127 devices, of which 81 are Namron light bulbs, a few Agara sensors and the rest a mix of Tuya compatible plugs and sensors. The lights are downlights throughout the house, so the network is very well spread out with routers. The walls are thick concrete. I have Google nest throughout the house, so I cannot choose the wifi channel. I have used the Sky Connect USB adapter, then a Sonoff Usb adapter, then changed to an ethernet adapter I found online. I finally divided the net into two, one on each side of the house, with an ethernet adapter for each, and it has been relatively stable. It is mostly for instance when I turned off all lights at the same time, or use an integration that dynamically changes the lights in a Hue like manner, that the system would crash. The crash would mean all devices were lost at the same time from HA, and all bulbs would light up an blink. The WAP factor goes way down when this happens, especially at night. The fix is to turn off power to all bulbs, reload ZHA until it stops saying it is unable to initialize, and then turn on a few bulbs at a time until everything is back on. Then leave the system for some time, before starting to use the lights again. When I divided the system into two networks only one network would go down at a time, and it happened much more seldom.
I tried again a few days ago to consolidate into one big network using ZHA and a new SLZB-06 in ethernet mode. Unfortunately it did not help, it was stable until about 60-70 devices were added, and then became even more unstable than the other coordinators when I tried to add more. I was able to carefully add all devices, but just turning on lights in a room ( 3-4 bulbs) would crash the system again. With the SLZB it is even more difficult to get ZHA to reload, and I usually have to disconnect it from power before I reload.
Any suggestions on what I can do to avoid ZHA dropping the network and needing to reinitialize? Or is the best solution to divide the net into two or more to limit the number of devices? I have also used Z2M and had the exact same experience, so it does not seem to be ZHA specific, and since it hasn’t changed through four different coordinators it is unlikely to be caused by the type of coordinators.

1 post - 1 participant

Read full topic

Keep track of solar overproduction

$
0
0

Hi I have two solar panels and a hoymiles DTU.
Now I want to find out if a battery makes sense.
My idea to do so is to keep track of my solar power overproduction (power I generated but did not use) over time and how much power I use from the grid because I produce no or too less solar power.

Basically I want a card on which I can see what is my overproduction in kWh over time (daily, weekly monthly, yearly, total) and the same for the grid usage.
I.e. in April I “wasted” 20 kWh and took 40kWh from the grid.

Sry if this is a very basic question but I was not able to do this on my own

ATM I track my powerusage with a set of smartmeters and some base usage (like the fridge that runs 24h):

template:
  - sensor:

      # 24h Base Power Consumption (Always 21.5W)
      - name: "24h Base Power Consumption"
        unique_id: 24h_base_power
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
        state: 21.5  # Constant power usage

      # Lights Power Consumption (80W from 08:00 - 23:59)
      - name: "Lights Power Consumption"
        unique_id: lights_power_consumption
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
        state: >
          {% set hour = now().hour %}
          {% if 8 <= hour < 24 %}
            20
          {% else %}
            0
          {% endif %}
      - name: "Total Power Consumption"
        unit_of_measurement: "kW"
        device_class: power
        state_class: measurement
        state:  >
          {{ (
              states('sensor.24h_base_power_consumption')|float +
              states('sensor.lights_power_consumption')|float)
              / 1000 }}
      - name: "Total Power Consumption Combined"
        unit_of_measurement: "W"
        state: >
          {% set plugs = [
            states('sensor.unbenannt_p110_derzeitiger_verbrauch') | float(0),
            states('sensor.unbenannt_p110_derzeitiger_verbrauch_2') | float(0),
            states('sensor.unbenannt_p110_derzeitiger_verbrauch_3') | float(0),
            states('sensor.unbenannt_p110_derzeitiger_verbrauch_4') | float(0)
          ] %}
          {{ (plugs | sum) + states('sensor.total_power_consumption') | float(0) }}
      - name: "Solar Overproduction"
        unit_of_measurement: "W"
        state: >
          {% set consumption = states('sensor.total_power_consumption_combined') | float(0) %}
          {% set solar = states('sensor.wechselrichter_ac_leistung') | float(0) %}
          {{ [solar - consumption, 0] | max }}

      - name: "Grid Usage"
        unit_of_measurement: "W"
        state: >
          {% set consumption = states('sensor.total_power_consumption_combined') | float(0) %}
          {% set solar = states('sensor.wechselrichter_ac_leistung') | float(0) %}
          {{ [consumption - solar, 0] | max }}
      - name: "Solar Overproduction Hourly"
        unit_of_measurement: "kWh"
        state: >
          {% set stats = state_attr('sensor.solar_overproduction_energy', 'statistics') %}
          {{ stats['sum'] if stats else 0 }}
      - name: "Solar Overproduction Energy"
        unit_of_measurement: "kWh"
        state: >
          {{ (states('sensor.solar_overproduction_energy_wh') | float(0)) / 1000 }}

Ah and a OT question:
how to stretch a card over multiple columns?

1 post - 1 participant

Read full topic

Help: Music selection via Dropdown

$
0
0

Happy Easter everyone!

I have built an alarm clock automation which I control via a Shelly Wall Display.

I would now like to integrate a button on the wall display that gives me a selection of music tracks. These music files are in the MyMedia folder.
If I now select a piece of music, this music should be used by a Sonos speaker as an alarm clock.

The whole thing should work as dynamically as possible. This means that when I add a new piece of music to the MyMedia folder, it should also be available for selection in the dropdown.

At the moment I have implemented this in a very complicated way using various helpers, automations and browser mod. It works, but is a disaster when I want to add new music.

Have you already implemented something similar and do you have any ideas on how to make this as streamlined as possible?

1 post - 1 participant

Read full topic

Viewing all 107764 articles
Browse latest View live


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