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

Losing oscillation controls when adding a template fan to HomeKit

$
0
0

When I add this 100% working HA fan to HomeKit, there’s only the speed slider and no oscillation switch. Is there a way to make it appear?

The real device itself, thrown into HomeKit has way too many nameless switches. That’s why I’m trying to make this simplified fan proxy

fan:
  - platform: template
    fans:
      universal_fan:
        friendly_name: "Universal simple fan"
        value_template: >
          {% if is_state('fan.zhimi_fa2_c8aa_fan', 'on') %}
            on
          {% else %}
            off
          {% endif %}
        oscillating_template: "{{ state_attr('fan.zhimi_fa2_c8aa_fan', 'horizontal_swing') }}"
        percentage_template: "{{ state_attr('fan.zhimi_fa2_c8aa_fan', 'percentage') }}"
        turn_on:
          service: fan.turn_on
          target:
            entity_id: fan.zhimi_fa2_c8aa_fan
        turn_off:
          service: fan.turn_off
          target:
            entity_id: fan.zhimi_fa2_c8aa_fan
        set_oscillating:
          service: fan.oscillate
          target:
            entity_id: fan.zhimi_fa2_c8aa_fan
          data:
            oscillating: "{{ oscillating }}"
        set_percentage:
          service: fan.set_percentage
          target:
            entity_id: fan.zhimi_fa2_c8aa_fan
          data:
            percentage: "{{ percentage }}"
        speed_count: 4

if I look at the device in DevTools->State it says that oscilating is Null somehow

preset_modes: null
oscillating: null
percentage: 50
percentage_step: 25
preset_mode: null
friendly_name: Universal simple fan
supported_features: 3

1 post - 1 participant

Read full topic


The Huawei LTE integration is not working if the DHCP server is disabled on the router

$
0
0

Hi ! :slight_smile:

Since 3 years I’m using HASS on Rasp Pi 4, and HA is monitoring my Huawei 4G router, with no any problem, never.

Few days ago, I stopped the integrated DHCP server in the 4G router, to install the DHCP addon in HA (+DNS server), to have better settings, more DHCP reservations, …

Then today I noticed that there is an error on the Huawei LTE integration :

I remembered that I disabled the Huawei DHCP server, so I enabled it back. Then I rebooted HA, then… it’s working normally :

I absolutely need to access to the 4G router (at least to send SMS notification in HA).
And I need a better DHCP server, so I need to disable the 4G router’s one…

Do you have any idea, please ?

Thank you.

1 post - 1 participant

Read full topic

Creating an upcoming event lists from local calendar

$
0
0

I have a local HA calendar that I put maintenance/house hold to dos on.

Right now I’m using a static entry or a helper to set the next occurrence, it would be great if I could turn this into a template that reads the local calendar and populate this markdown.

Is this possible?

{% set idate = (state_attr('input_datetime.vehicle_inspection_due', 'timestamp') | timestamp_custom('%m/%d/%Y')) %}
{% set rdate = (state_attr('input_datetime.vehicle_registration_due', 'timestamp') | timestamp_custom('%m/%d/%Y')) %}
{% set acfilter = "9/1/2024" %}
{% set realestate1 = "12/1/2025" %}
{% set realestate2 = "5/15/2026" %}
Car Inspection due in {{ (strptime(idate, '%m/%d/%Y', today_at()) | as_local - today_at()).days }} day(s) on {{ idate }}
Car Registeration due in {{ (strptime(rdate, '%m/%d/%Y', today_at()) | as_local - today_at()).days }} day(s) on {{ rdate }}
A/C Filter Replacement due in {{ (strptime(acfilter, '%m/%d/%Y', today_at()) | as_local - today_at()).days }} days(s) {{ acfilter }}
Home RE Taxes Part 1 due in {{ (strptime(realestate1, '%m/%d/%Y', today_at()) | as_local - today_at()).days }} days(s) {{ realestate1 }}
Home RE Taxes Part 2 due in {{ (strptime(realestate2, '%m/%d/%Y', today_at()) | as_local - today_at()).days }} days(s) {{ realestate2 }}

2 posts - 2 participants

Read full topic

How to combine the two, if combining makes any sense

$
0
0

For the last few days I have been working on the automation for my Xiaomi Air Purifier 2S. After many trials and versions, and thanks to the help of the guys on this forum, I have reached the optimal version. A number of problems arose from the fact that the “off” mode is not clearly interpreted and theoretically the only valid preset modes are: Auto, Silent, Favourite. In any case, the actual code works as expected.

alias: Air purifier automation
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.air_purifier_pm2_5
    above: 85
    below: 2000
    id: Auto
  - platform: numeric_state
    entity_id:
      - sensor.air_purifier_pm2_5
    above: 35
    below: 84.9
    id: Silent
  - platform: numeric_state
    entity_id:
      - sensor.air_purifier_pm2_5
    below: 34.9
    id: "off"
    for:
      hours: 0
      minutes: 5
      seconds: 0
  - platform: state
    entity_id:
      - schedule.nighttime
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: schedule.nighttime
            state: "on"
        sequence:
          - service: switch.turn_off
            target:
              entity_id:
                - switch.air_purifier_led
                - switch.air_purifier_buzzer
            data: {}
      - conditions:
          - condition: state
            entity_id: schedule.nighttime
            state: "off"
        sequence:
          - service: switch.turn_on
            metadata: {}
            data: {}
            target:
              entity_id:
                - switch.air_purifier_buzzer
                - switch.air_purifier_led
  - if:
      - condition: template
        value_template: "{{ trigger.id != 'off' }}"
    then:
      - service: fan.set_preset_mode
        data:
          preset_mode: "{{ trigger.id }}"
        target:
          entity_id: fan.air_purifier
    else:
      - service: fan.turn_off
        target:
          entity_id: fan.air_purifier
        data: {}
mode: restart

I have a second automation handling the control of the device by the window opening sensor. Unfortunately, I don’t know how to integrate the two and whether such an integration even makes sense. I have looked through many threads on the forum but nothing comes out of them to apply to my case. Please look at what I have created and give some suggestions on what to do and how to do it. My knowledge is still too small to figure out something for practical application myself.

alias: Air purifier on/off
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.ikea_window_sensor_opening
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition: []
action:
  - service: fan.turn_off
    target:
      entity_id:
        - fan.air_purifier
    data: {}
  - service: automation.turn_off
    data:
      stop_actions: false
    enabled: true
    target:
      entity_id: automation.air_purifier
  - wait_for_trigger:
      - platform: state
        entity_id:
          - binary_sensor.ikea_window_sensor_opening
        from: "on"
        to: "off"
        for:
          hours: 0
          minutes: 0
          seconds: 10
    continue_on_timeout: false
  - service: automation.turn_on
    target:
      entity_id:
        - automation.air_purifier
    data: {}
    enabled: true
  - condition: numeric_state
    entity_id: sensor.air_purifier_pm2_5
    above: 1
    enabled: true
  - service: fan.turn_on
    target:
      entity_id:
        - fan.air_purifier
    data: {}
    enabled: true
mode: restart

2 posts - 2 participants

Read full topic

Media / Light mushroom cards acting all binary

$
0
0

This is on an iPad. A few years old now, but “young enough” to have a Lightning connector.

Most of the time (for some reason not 100% consistently) the fader adjusters act as binary switches in lovelace. So I’ll tap or slide to turn the volume up (or down), and it wil instantly flick to 100%.

Has anyone else seen this issue?

1 post - 1 participant

Read full topic

Wait for trigger won't proceed

$
0
0

Hi all,

Have a bit of a brain scratcher that I can’t quite figure out. I have an automation that has a wait for trigger, in this case waiting from a door to go from on to off (open then close).

The trigger does in fact change from on to off but the automation does not proceed. It was working but now it isn’t and I don’t understand why…

Here’s a trace.

And here’s the state (if was on)… now its off

The automation should proceed to the next step shouldn’t it?

6 posts - 6 participants

Read full topic

Hide iFrame cards for http links when connecting to Home Assistant outside of local network

$
0
0

Hi. I’ve set up a webpage/iframe card that links to Grafana (Grafana is running on a different server on my local network). When connecting to Home Assistant outside the local network you get an error message saying that http links can’t be served over https connection. I only want the graphs to appear when connecting to the local network. Is there a way to hide the card so this error doesn’t show for my users when connecting externally?

1 post - 1 participant

Read full topic

Jinja template: all same state

$
0
0

Hi everybody,

I would like to create a template sensor that is only True if the state of all entities is False.

Unfortunately, the source sensors are sensor entities, not binary_sensor entities. This means, that I cannot use group for this. It will not report the state as expected.

I can never get jinja right… Would somebody please help me finish the sensor?

{% set my_entities = [
  'sensor.00_currently_backing_up',
  'sensor.01_currently_backing_up',
  'sensor.02_currently_backing_up',
  'sensor.03_currently_backing_up',
  'sensor.04_currently_backing_up',
  'sensor.05_currently_backing_up'
  ] %}
{% set my_state=False %}

# what goes here?

I need something like (pseudo-code) if every entity in entity == my_state, then return true; else return false.

So if all these currently_backing_up sensors’ state is False, then I’d like my template sensor to be True or On.

In any other case (either one/some of them is/are not False, or perhaps one/some of them is/are unknown or anything else but False, ) my template sensor needs to be False or Off as well).

Thank you in advance for your help :slight_smile:

3 posts - 2 participants

Read full topic


Automation fan struggle only run 30min and low for the night

$
0
0

Hi
Is there a way to let the fan only run for 30 minutes max every time it triggers? It needs some pause I think for like 15 minutes to avoid another trigger run after those 30 minutes.
And when the time hits 7 pm it needs to change back to Low and is not allowed to change again until the next morning on 9 am.

I’m struggling to get it into one automation for weeks now. Or is it best practice to create another automation to control the 30 minutes and 7 pm requirement?

alias: fan
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.xiaomi_humidity
    above: 70
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: medium
  - platform: numeric_state
    entity_id:
      - sensor.xiaomi_humidity
    above: 70
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: low
  - platform: numeric_state
    entity_id:
      - sensor.esp_co2
    above: 1200
    id: medium
  - platform: numeric_state
    entity_id:
      - sensor.esp_co2
    below: 1199
    id: low
  - platform: time
    at: "19:00:00"
    id: low
condition:
  - condition: time
    after: "09:00:00"
    before: "18:59:00"
action:
  - service: fan.set_preset_mode
    metadata: {}
    data:
      preset_mode: "{{ trigger.id }}"
    target:
      entity_id: fan.wtw_ventilation
mode: single

1 post - 1 participant

Read full topic

RTL_433 MQTT help

$
0
0

HA’s MQTT integration is installed and seems to be operational. I’m trying to send a LaCrosse-TX141THBv2 sensor’s data to my HA. I’ve gotten this far:

rtl_433 -R 73 -C customary -F mqtt://homeass:1883,user=mqttu,pass=mqttu

Returns:

rtl_433 version 21.12 (2021-12-14) inputs file rtl_tcp RTL-SDR SoapySDR

Use -h for usage help and see https://triq.org/ for documentation.Trying conf file at “rtl_433.conf”…
Trying conf file at “/home/jeff/.config/rtl_433/rtl_433.conf”…
Trying conf file at “/usr/local/etc/rtl_433/rtl_433.conf”…
Trying conf file at “/etc/rtl_433/rtl_433.conf”…

Publishing MQTT data to homeass port 1883
Publishing device info to MQTT topic “rtl_433/linux/devices[/type][/model][/subtype][/channel][/id]”.
Publishing events info to MQTT topic “rtl_433/linux/events”.
Publishing states info to MQTT topic “rtl_433/linux/states”.
Registered 1 out of 207 device decoding protocols [ 73 ]
Detached kernel driver
Found Rafael Micro R828D tuner
RTL-SDR Blog V4 Detected
Exact sample rate is: 250000.000414 Hz
Sample rate set to 250000 S/s.
Tuner gain set to Auto.
Tuned to 433.920MHz.
MQTT Connected…
MQTT Connection established.

How do I set up a card to display temp/humidity?

1 post - 1 participant

Read full topic

Trouble with bubble/card_mod

$
0
0

So, I’m still pretty fresh with HA. I’m having some trouble with my bubble popup cards. I’m playing around with the LCARS theme and I’ve figured things out for the most part. Then I discovered bubble pop-ups. I’ve set up my stack of buttons and their appropriate hash/links. I create the vertical stack with the first card being the popup linked to my buttons. I then try to add my lights with my card_mod themes. They work and look great. Then I close the pop-up and next time I open it, the card_mod doesn’t apply and I just have ugly coloured buttons.
I delete and re-apply the card_mod, it works, then next time it isnt applied anymore but still in the YAML.
I have no idea what’s going on but it’s driving me crazy… Any help would be greatly appeciated.
This is what it is supposed to look like

4 posts - 2 participants

Read full topic

Keba P30 - Config OK? But no state in the Dashboard

$
0
0

The Keba State is “Connected”
The Keba Charging State is “unknown”
Failsafe is “unsecure” …

looks like it connected, but can not read anything. What do I miss, where can I check deeper?

This my configuration

keba:
host: IP V4 Adress of the box
failsafe: true
failsafe_timeout: 30
failsafe_fallback: 10
failsafe_persist: 0

1 post - 1 participant

Read full topic

Ecobee and HomeKit Device Integration

$
0
0

Hello,

I have 3 Ecobee thermostats and have been using the Ecobee integration. I wanted to convert to using the HomeKit Device Integration to keep things local. My Ecobee3 was discovered and I was able to connect it just fine.

However, my 2 Ecobee4’s are not being discovered. I do not have any other Homekit hubs, no Apple Hub or Apple TV.

Any tips or suggestions to get them to be discovered?

Thanks

1 post - 1 participant

Read full topic

Random Position for Cover

$
0
0

Hi, I´m trying to set the position of a cover from a random integer number but I´m not able to.
This is what I´m trying:

device_id: ----
domain: cover
entity_id: ----
type: set_position
position: (range(1, 20)|random|int)

And this is what I receive when trying to save my automation:

Message malformed: value must be one of [‘close’, ‘close_tilt’, ‘open’, ‘open_tilt’, ‘stop’] for dictionary value @ data[‘type’]

What am I doing wrong?

1 post - 1 participant

Read full topic

Slave plug automatic power on only one timer per day

$
0
0

Hi,
I have two IKEA Tradfri zigbee Plugs and try to automate my pool pump and the Salt-chrine gernerator.

I have no Configured that the gernerator is powered on 1 Minute abfter the pump to bring some air out of the system.

But it want toch check:

  • was the generator powerd on on this day for atl least 3 hous → don’t power on th Generator
  • was the Generpowere on on this day for less than 3 hours → Power on the Generator on Minute after the Pump for 3 houres minus the previous runtime
  • wasn’t the gernerator powered on on this day ->Power on the Generator on Minute after the Pump for 3 Hours

how can i do this .
My Idea was so save the last poser on in a Var an if the runtime is over 3 Hourer on Bool Var “Runtime Complete”

has someone an idea?

1 post - 1 participant

Read full topic


Buy recommendation for Energy and Water

$
0
0

Hi Guys,

i want to have inside my HA the Watercounter and the energycounter.

For Water i have in Germany such an old version which shows only the count and looks like a clock :wink:

For Energy i got the Landis+Gyr E320-eHZ and also i got a PIN Code from my energy company.
But i did not understand how to connect directly

So at the end i think i need 2 componentes - One for Water and one for Energy - Is this right - Could you help me what is the best oppertunity i should buy?
I have at both positions the option to use wlan - Also i have a lan access in the fuse box.

What i want to have in HA is the current used energy - Also the Energy i send into the energynetwork. Maybe also historical data.

For Water i think its only possible to see the current - But if its possible i would also see daily and historical - Maybe with software?!

Thanks for your support.

1 post - 1 participant

Read full topic

Yale Assure Lock 2 Keyed Deadbolt

$
0
0

Hello everyone, I am new to Home Assistant, bought a lock that was confirmed to work with HA and I am having problems adding it to HA, any tips what I am doing wrong here… the lock showed up as a new device, I type the homekit number from the label and this message shows up (I removed the mac addresses from the message below)

An unhandled error occurred while attempting to pair with this device. This may be a temporary failure or your device may not be supported currently: LF0 () - : Failed to connect after 9 attempt(s): No backend with an available connection slot that can reach address was found: The proxy/adapter is out of connection slots or the device is no longer reachable; Add additional proxies (ESPHome Bluetooth Proxy) near this device

I already tried to reset the device and nothing, now I have the lock on my desk next to my HA PI4

2 posts - 1 participant

Read full topic

Unable to find how to get HA to tell me what time it is

$
0
0

I can ask Alexa “Alexa, what time is it?” and I get a reply. I am trying to do this disconnected from the internet. Does anybody have an idea? I am new to Home Assistant but I can voice control my lights.

1 post - 1 participant

Read full topic

Trouble with template for counting 'ON' states in a blueprint's light group inputs

$
0
0

Hello everyone,

I am working on a Home Assistant automation project that aims to control living room lights using a Hue button. The automation is designed to increase and decrease brightness, as well as toggle the lights’ on/off state. However, I am encountering a synchronization issue with the current state of the lights, leading to unintended behaviors.

Context

The setup includes an automation that responds to short presses on different areas of a Hue button. The intended actions are to increase brightness, decrease it, or toggle the state of the lights (on/off). The problem arises when toggling between on and off states.

Problem

The lights in my setup do not always maintain synchronization in their current states, particularly when I attempt to control them collectively using a single command. While it is expected and normal for some lights to be on and others to be off during certain scenes or settings, the issue arises when I use the Hue button to simultaneously turn all lights in the group on or off. Instead of uniformly responding to the command, some lights that were previously off may turn on, and vice versa, leading to inconsistent states across the group. This desynchronization affects the intended uniformity of the lighting environment when a single action—either turning all lights on or all off—is expected.

Here’s an example of what I tried to do to:

action:
  - choose:
      - conditions:
          - condition: trigger
            id: button_on_off
        sequence:
          - choose:
              - conditions:
                  - condition: template
                    value_template: >-
                      {{expand(state_attr('input.light_entity', 'entity_id')) | selectattr('state','eq','on') | map(attribute='entity_id') | list | count == 0}}
                sequence:
                  - service: light.turn_on
                    target: !input light_entity
                    data:
                      kelvin: !input color_temperature
                      brightness: 255
                      transition: 1
              - conditions:
                  - condition: template
                    value_template: >-
                      {{expand(state_attr('input.light_entity', 'entity_id')) | selectattr('state','eq','on') | map(attribute='entity_id') | list | count > 0}}
                sequence:
                  - service: light.turn_off
                    target: !input light_entity

Here are the inputs :

  input:
    hue_button_device:
      name: Hue remote
      description: Three button Hue remote 
      selector:
        device:
          integration: hue
          entity:
            domain: sensor
    light_entity:
      name: Light
      description: Lights to control
      selector:
        target:
          entity:
            domain: light

Specific Issue

The problem with the current template is that during execution, it always selects the first branch ({{expand(state_attr('input.light_entity', 'entity_id')) | selectattr('state','eq','on') | map(attribute='entity_id') | list | count == 0}}), even if all the lights are already on. Seems like the condition is always met because of a empty list.

What I’m Looking For

I am seeking assistance with developing a Jinja2 template that can accurately and dynamically count the number of lights in a specified ‘on’ state from a group of lights provided in the blueprint input !input light_entity. The goal is to enable effective synchronization of the lights’ states in response to interactions with the Hue button. This template should efficiently assess the active states to ensure that the automation reacts correctly, turning all lights on or off based on their collective state.

I am particularly interested in solutions or suggestions on how to effectively use Jinja2 templates to filter and transform these data to manage the light states reliably.

Any help or guidance would be greatly appreciated to overcome this challenge.

Thank you in advance for your support and suggestions.

3 posts - 3 participants

Read full topic

HACS submit license link missing

$
0
0

Hi, guys,
I’m trying to instal HACS (it’s not the first time I’m doing this). When I register the HACS installation via github, the link/button to submit it is missing in the UI (see screenshot). I tried it in Chrome and Edge browsers.

Any ideas?

Thanks

image

1 post - 1 participant

Read full topic

Viewing all 109124 articles
Browse latest View live


Latest Images

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