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

Automation for checking if run x days prior

$
0
0

I am trying to setup an automation that will send me a notification to take a reading of my energy meter with the following conditions:

  1. If it’s the first of the month and it hasn’t been done, send a notification reminder
  2. If I have done it within the last 3 days prior to first of the month, send a notification advising I’ve already done it.

I have setup a toggle helper for if the read has been done or not, as well as an input date helper (date only) to keep track of when the read was last done.
I’ve done a bit of searching but haven’t been able to get the check done around if it’s been done within the last 3 days.

This is the code I have so far:

alias: Energy Read Check
description: ""
trigger:
  - platform: time
    at: "10:10:00"
condition:
  - condition: template
    value_template: "{{ now().day == 1 }}"
    enabled: true
action:
  - if:
      - condition: state
        entity_id: input_boolean.energy_read
        state: "on"
      - condition: and
        conditions:
          - condition: template
            value_template: >-
              "{{ now() - input_datetime.energy_read_date <= timedelta(days=3) }}"
    then:
      - service: notify.all_mobile_devices
        metadata: {}
        data:
          message: Meter has been read for the month already.
          title: Meter already read.
          data:
            ttl: 0
            priority: high
    else:
      - service: input_boolean.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: input_boolean.energy_read
        enabled: true
      - repeat:
          count: 2
          sequence:
            - if:
                - condition: state
                  entity_id: input_boolean.energy_read
                  state: "off"
              then:
                - service: notify.all_mobile_devices
                  metadata: {}
                  data:
                    message: Need to send energy meter reading
                    title: Send meter read
                    data:
                      ttl: 0
                      priority: high
                - delay:
                    hours: 1
                    minutes: 0
                    seconds: 0
                    milliseconds: 0
        enabled: true
mode: single

In checking if the read has been done within the last 3 days of 1st of the month, I’ve tried the following with none working:
{{ now() - input_datetime.energy_read_date <= timedelta(days=3) }}
{{ now() - states(‘input_datetime.energy_read_date’) | as_datetime <= timedelta(days=3) }}
{{ now() - input_datetime.energy_read_date <= timedelta(days=3) }}

Hoping someone can assist with how to do this check.

Cheers.

1 post - 1 participant

Read full topic


Blueprint with restful notifications !input

Configure Device Specific Settings in ZHA

$
0
0

Hey all,
I added some Tuya Zigbee Smart Plugs (TS011F) using ZHA and the measurements are slightly off and the default precision is 0, which I would like to change to 1 (118V to 118.2V).

In the ZHA, I’ve been poking around Manage Zigbee Device and then Clusters but dont see any option where I can change these. Compared to Z2M where these settings are easily configurable from Settings(specific) page, like shown here:

Any ideas on where/how can I easily change these settings in ZHA?
Cheers

1 post - 1 participant

Read full topic

Notification when some enters zone and is there for 2 min

$
0
0

How can i have an automation that only flags once someone is in a zone for 2 minutes?

3 posts - 2 participants

Read full topic

The New "Category" and how to use

$
0
0

OK, so I thought I would “categorize” all my automations … works perfect (unless you use Remote Home Assistant which is another issue altogether).

I finished that, added all these beautiful new categories for my Automations.

Then I went to my scripts and I naturally thought I could select a script and could add a category from all those beautiful ones I just entered. And BOOM, there are none there.

So am I to understand that categories only apply to what they are created in? As in an Automation category is not a script category?

Or did I do something wrong?

In automations:

Move to script to assign a category and:

image

Implies to me I need to recreate all those categories again (or in other words … an automation category is not a script category). … And just to be sure, I did restart Home Assistant. SO I am lost at what a “category” is as it does not apply across things only within things.

6 posts - 2 participants

Read full topic

AI on the edge help request - reading gas meter

$
0
0

I just purchased one of these things on aliexpress -

image

I see several videos on youtrube on how to do this but they are not very well done. Anyone have one they have used that was done clearly?

Thanks in advance -

2 posts - 2 participants

Read full topic

Thermostat Card Temperature Set Points Missing

$
0
0

I am a new HA user. I have three Remotec ZXT-600 Z-Wave IR controllers working with three identical Fujitsu Heat Pumps. I invoked Thermostat Cards for each on the Dashboard. As far as I can tell their configuration is identical. However, one shows and enables setting of the temperature set points for heating and cooling, but the other two do not. The set point dots do not appear and the pointer remains as an arrow and not a finger. Any ideas about where I should look to try to resolve this issue? Currently I can only alter the set points for one of the three heat pumps.
I have tried creating duplicate cards from the one that works correctly, but the duplicates do not show set points. Al three devices were working fine previously on a Vera Plus Z-Wave network.

2 posts - 2 participants

Read full topic

Visual Editor not capabale of doing what I need - Simple YAML

$
0
0

I’m fine if yall want to “teach this man to fish” rather than “give him a fish.” I’ve looked around for a couple of hours and can’t find a concise solution to my question. I have no doubt that the majority here can answer this after you get done rolling your eyes at the newbie! :wink: Feel free just to post a link or suggest a search term that I can use to find what I’m looking for.

I have a parking laser assist setup on a smart plug. These lasers are particularly prone to going dim if they are left on a lot. I have a driveway motion sensor at the end of my mailbox, and my garage door opener has an obstruction detection sensor, both integrated into HA. Currently the trigger is the obstruction sensor, and the condition is the driveway sensor is detecting motion. This won’t work obviously, because both sensors would have to be detecting simultaneously for the automation to run.

I’d like to add a condition that the driveway motion sensor must have detected movement in the last 30 seconds for the automation to run. That way, a car pulling in gives a 30 second window where the obstruction sensor can trigger the automation.

I setup the automation in Visual Editor then copy/pasted the YAML it generated below. I don’t even know how to copy paste with the YAML line numbers. I’m kind of shaking my head at myself.

EDIT: well when I tried to post the thread, the forum even told me I had no idea what I was doing and told me how to do it. So wahlah!

alias: Parking Sensor ON
description: ""
trigger:
  - type: problem
    platform: device
    device_id: 89023c15f1853a5a76823a2b10533f3f
    entity_id: f8757e78b491ca75440673cf2c0f564c
    domain: binary_sensor
condition:
  - type: is_motion
    condition: device
    device_id: 9566d75bd1a5c03ce1f7667f187bc0c4
    entity_id: 2968cf73b8b10e14be0e3f8856e383ed
    domain: binary_sensor
action:
  - type: turn_on
    device_id: b264bcbff5891d9f52d32d4a087a9a85
    entity_id: 63b3b11200be485d611f8108d5410ed6
    domain: switch
mode: single

2 posts - 2 participants

Read full topic


Broadlink RM3 Mini - Did I miss a breaking change?

$
0
0

In the past few days my Broadlink RM3 Minis stopped working. Did I miss a breaking change?

Broadlink

2 posts - 2 participants

Read full topic

Template binary sensor issue with 'unavailable' value

$
0
0

Hi there, pretty new to HA, so please bear with me.

I’m working on a binary sensor template which looks like:

{% set setpoint = states('input_number.suite_setpoint_calefaccion') %}
{% set current_temp = states('sensor.termostato_suite_sonoff_temperature') %}
{% set setpoint_offset = states('input_number.offset_setpoint_calefaccion') %}
{% if not(setpoint|is_number) or not(current_temp|is_number) or not(setpoint_offset|is_number) %}
{{ False }}
{% endif %}

When sensor.termostato_suite_sonoff_temperature is unavailable the binary sensor shows as unavailable.
I thought the is_number checks I’m doing would catch this and end up returning False but it doens’t seem so.
What I’m missing here?

Thanks!

10 posts - 3 participants

Read full topic

Fire HD 8 Plus column behaviour on tablet

$
0
0

I am a new kid on the Home Assistant block with no coding experience.

I have a Dashboard with 2 pages (titles: “Page1”, “Page2”).

Page 1 is setup with View Type as ‘Sections (experimental)’. I selected this because I wanted to force everything into 4 columns for this dashboard:

When setting up Page 1 on desktop, I am able to set it so that I can see everything in 4 columns, however on my Fire HD 8 Plus it renders as only 2 columns (and sometimes 1 column randomly, after restarting):

What am I doing wrong? How do I force the Page 1 view of this dashboard to appear as 4 columns when viewing it on my Fire HD 8 Plus?

1 post - 1 participant

Read full topic

Smart fan native control?

$
0
0

I have a light connection up on the ceiling in the small bedrooms. I would like to install one of these “smart” fan/light combo https://www.amazon.com/VOLISUN-3000K-6500K-Dimmable-Bladeless-Fandelier/dp/B0BXWLSXX1/ref=sr_1_6?th=1. My question is are there any models that can be controlled locally by home assistant? So I can throw a couple of buttons here and there (one for fan, one for light) instead of it’s own remote or app that I am sure users their online servers.

I am not wanting to control them by the wall switch also as I see these fan/light combo has only one hot/neutral wire connecting so even if I ran a second set of wire to the ceiling, controlling the fan and light independently would be challenging.

1 post - 1 participant

Read full topic

How to measure voltage the chip is getting on esp32?

$
0
0

On esp8266, there is a very easy way to do it

sensor:
  - platform: adc
    pin: VCC
    name: "VCC Voltage"

How to do it on esp32 without adding any hardware?

1 post - 1 participant

Read full topic

Light Card Slider Animation

$
0
0

Hello, I recently borked my system and had to reinstall HA. The brightness slider in the card for a light (I only have one light to try) seems to have an animation now? Turning the light on/off is instant and it doesn’t seem to respond to the transition setting, rather there’s something ‘manually’ stepping the brightness to whatever I actually requested.

It’s current speed is pretty slow/annoying. Id like to speed it up significantly or just disable it entirely to make it behave as it was.

2 posts - 2 participants

Read full topic

Failed to start zigbee: zigbee2mqtt + Docker + Conbee II

$
0
0

Hi,

I messed up but don’t know what I did wrong.
I’ve updated both the ConbeeII stick and Ubuntu Server, and now zigbee2mqtt gives the following error when starting Docker Compose:

Attaching to zigbee2mqtt
zigbee2mqtt  | Using '/app/data' as data directory
zigbee2mqtt  | Zigbee2MQTT:info  2024-05-01 09:43:35: Logging to console and directory: '/app/data/log/2024-05-01.09-43-35' filename: log.txt
zigbee2mqtt  | Zigbee2MQTT:info  2024-05-01 09:43:35: Starting Zigbee2MQTT version 1.36.1 (commit #ffc2ff1)
zigbee2mqtt  | Zigbee2MQTT:info  2024-05-01 09:43:35: Starting zigbee-herdsman (0.40.3)
zigbee2mqtt  | Zigbee2MQTT:error 2024-05-01 09:43:46: Error while starting zigbee-herdsman
zigbee2mqtt  | Zigbee2MQTT:error 2024-05-01 09:43:46: Failed to start zigbee
zigbee2mqtt  | Zigbee2MQTT:error 2024-05-01 09:43:46: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
zigbee2mqtt  | Zigbee2MQTT:error 2024-05-01 09:43:46: Exiting...
zigbee2mqtt  | Zigbee2MQTT:error 2024-05-01 09:43:46: undefined
zigbee2mqtt exited with code 0

For troubleshooting:

ls -l /dev/serial/by-id:

lrwxrwxrwx 1 root root 13 May  1 09:33 usb-0658_0200-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 May  1 09:33 usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128773-if00 -> ../../ttyACM1

docker compose file contains:

  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt
    restart: unless-stopped
    volumes:
      - /opt/zigbee2mqtt/data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - 8080:8080
    environment:
      - TZ=Europe/Brussels
    devices:
      - /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128773-if00:/dev/ttyACM0

zigbee2mqtt/data/configuration.yaml:

homeassistant: true
frontend: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://10.27.27.24:1883
  user: admin
  password: xxxx
serial:
  port: /dev/ttyACM0
  adapter: deconz
  disable_led: false
  baudrate: 115200
  rtscts: false
advanced:
  network_key:
    - 28
    - 52
    - 208
    - 181
    - 104
    - 3
    - 126
    - 190
    - 120
    - 20
    - 66
    - 237
    - 110
    - 20
    - 185
    - 88
  log_level: info

Any idea?

2 posts - 2 participants

Read full topic


Automation data action uri change to trigger sensor

$
0
0

Hi,

I’ve got an automation which informs me about the lights if these are still on for 2 hours.
Because of the multiple triggers, I want to have a data action (a button in the notification) that points/go to the belonging trigger sensor.

So for instance when the lightgarage triggers, this uri needs to point to:
uri: entityId:sensor.lightgarage
And when another trigger is hit (lets say lightkitchen, the uri needs to change to that light entity:
uri: entityId:sensor.lightkitchen

Is this possible?

alias: light
description: ""
trigger:
  - platform: state
    entity_id:
      - light.garage
    for:
      hours: 2
      minutes: 0
      seconds: 0
    from: "off"
    to: "on"
  - platform: state
    entity_id:
      - light.kitchen
    for:
      hours: 2
      minutes: 0
      seconds: 0
    from: "off"
    to: "on"
condition: []
action:
  - service: notify.family
    data:
      message: "{{ trigger.entity_id }}\" is on for 2 hours, is this needed?"
      title: Lights
  data:
    actions:
      - action: URI
        title: LightGarage
        uri: entityId:sensor.lightgarage

3 posts - 2 participants

Read full topic

Modbus Integration: no data at any register from solar inverter

$
0
0

Hi!

I want to use the Modbus Integration to poll my Fronius Inverter (the official Integration uses the WebApi which is quite limited).
I’m a HA beginner, migrating from another system.

I can’t manage to read any data. This is my configuration:

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


modbus:
  - name: fronius_symo
    type: tcp
    host: 192.168.178.75
    port: 502
    sensors:
      - name: TestModbus2
        input_type: holding
        slave: 1
        address: 40119
        data_type: uint16

logger:
  default: warning
  logs:
    homeassistant.components.modbus: debug
    pymodbus: debug

the entity TestModbus stays always 0 and is not updated.
I successfully can poll the data over Modbus from my old system, and also I can poll them with a PC programm (QModMaster).


The Log is empty.

I don’t know how to continue… any advice?

1 post - 1 participant

Read full topic

Temperature from one hour ago

$
0
0

Dear community,

I have difficulties climbing the steep learning curve in homeassistant.
I’m trying to create a sensor that gives me the temperature from an hour ago.
I’ve tried the following but I cannot seem to get it right, as I always get errors and don’t seem to get anywhere.
I know it must seem easy for you homeassistant wizards present, but it’s difficult for me to understand the logic behind it.

Thank you !

- platform: statistics
  name: "tempcan002_temp_moins_1_heure"
  entity_id: sensor.tempcan002_temperature
  state_characteristic: value_min
  sampling_size: 10
#  start: "{{ now().timestamp() - 3600 }}"
#  end: "{{ now().timestamp() - 3540 }}"

3 posts - 3 participants

Read full topic

Can't see background image, icon and volume step options

Current light level compared to past 14 days at the same time of day

$
0
0

I’d like to compare a current measurement (e.g. light level, but also of interest: temperature) to the past ~14 days, as I want to know if it’s brighter/darker than “usual” at this time of day. How would I solve that?

One use case is controlling the blinds. Currently they react to the weather sensor (is it sunny or cloudy?), but for my geographical region the data isn’t useful. But if I’d know that its darker than usual, I’d know that it’s cloudy – and if it’s brighter than in the past 14 days at this time of day, then it’s certainly sunny.

Thanks for all your ideas!

1 post - 1 participant

Read full topic

Viewing all 107705 articles
Browse latest View live


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