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

Notifications not working?

$
0
0

Notifications just stopped coming through.

Any ideas?


Logger: homeassistant.components.mobile_app.notify
Source: components/mobile_app/notify.py:203
Integration: Mobile App (documentation, issues)
First occurred: October 10, 2023 at 07:45:47 (75 occurrences)
Last logged: 10:55:11

Error sending notification to https://mobile-apps.home-assistant.io/api/sendPushNotification: ClientConnectorError(ConnectionKey(host='mobile-apps.home-assistant.io', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=6776358913499273621), gaierror(-3, 'Try again'))

1 post - 1 participant

Read full topic


Issue Adapting Multi-speed Fan Control Blueprint for Tuya Controller

$
0
0

Hello everyone!

I’ve been trying to adapt a blueprint I found in the community for multi-speed fan control based on temperature. Here’s the original blueprint: Multi-speed Fan Control based on Temperature.

However, I’m using a Tuya controller which operates on a scale from 0 to 1000, instead of the standard percentage.

Here’s the error I encountered:

Message malformed: must contain at least one of below, above.

My current configuration is as follows:

trigger:
  - type: temperature
    platform: device
    device_id: 7892b03118d30b2c80076a5d1f6f9238
    entity_id: 92f8d765c7517aa66e988b81356a7875
    domain: sensor
condition: []
action:
  - device_id: 28a993347889f1d3652d3c210f87d2a1
    domain: number
    entity_id: c331e7c2333c163027cfd10807f5ecd2
    type: set_value

And all code look like that

blueprint:
  name: Auto fan speed (Number Domain)
  description: Temperature based Auto fan control.
  domain: automation
  input:
    fan_switch:
      name: Fan (Number Domain)
      description: The fan you wish to speed control using a number domain.
      selector:
        entity:
          domain: number
    min_fan_speed:
      name: Minimum Fan Speed
      description: Set the minimum speed at which your fan is still on.
      default: 16
      selector:
        number:
          min: 1.0
          max: 1000.0
          mode: slider
          step: 1.0
          unit_of_measurement: ""
    max_fan_speed:
      name: Maximum Fan Speed
      description: Set the maximum speed for your fan.
      default: 1000
      selector:
        number:
          min: 1.0
          max: 1000.0
          mode: slider
          step: 1.0
          unit_of_measurement: ""
    high_temp_value:
      name: What temperature would you like the fan to run at maximum speed.
      description: Set the high temperature sensor value.
      default: 31
      selector:
        number:
          min: 15
          max: 40.0
          step: 1.0
          mode: slider
    low_temp_value:
      name: What temperature would you like the fan to run at minimum speed.
      description: Set the low temperature sensor value.
      default: 23
      selector:
        number:
          min: 15
          max: 40.0
          step: 1.0
          mode: slider
    off_temp_value:
      name: What temperature would you like the fan to turn off.
      description: Set the fan OFF temperature sensor value.
      default: 21.5
      selector:
        number:
          min: 15
          max: 40.0
          step: 1.0
          mode: slider
    temp_sensor:
      name: Temperature Sensor
      description: Enter your temperature sensor.
      selector:
        entity:
          domain: sensor
          device_class: temperature
          multiple: false

variables:
  low_temp_value: !input low_temp_value
  off_temp_value: !input off_temp_value
  high_temp_value: !input high_temp_value
  min_fan_speed: !input min_fan_speed
  max_fan_speed: !input max_fan_speed
  temp_sensor: !input temp_sensor
  fan_switch: !input fan_switch
  current_temp: "{{ states(temp_sensor) | float }}"
  temp_range: "{{ high_temp_value | float - low_temp_value | float }}"
  fan_range: "{{ max_fan_speed | float - min_fan_speed | float }}"
  percent_per_degree: "{{ fan_range / temp_range }}"
  deg_above_min: "{{ current_temp | float - low_temp_value | float }}"
  set_fan_speed: "{{ min_fan_speed | float + (deg_above_min * percent_per_degree) }}"

trigger:
  - platform: state
    entity_id: !input temp_sensor
  - platform: time_pattern
    minutes: "/5"

condition:
  - condition: numeric_state
    entity_id: !input temp_sensor
    above: !input off_temp_value

action:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ current_temp | float > high_temp_value | float }}"
        sequence:
          - service: number.set_value
            target:
              entity_id: !input fan_switch
            data:
              value: !input max_fan_speed
      - conditions:
          - condition: template
            value_template: "{{ current_temp | float <= off_temp_value | float }}"
        sequence:
          - service: number.set_value
            target:
              entity_id: !input fan_switch
            data:
              value: 0
      - conditions:
          - condition: template
            value_template: "{{ current_temp | float > low_temp_value | float and current_temp | float <= high_temp_value | float }}"
        sequence:
          - service: number.set_value
            target:
              entity_id: !input fan_switch
            data:
              value: "{{ set_fan_speed }}"

mode: single

sorry for my english i’m french guy …

Would appreciate if someone could help identify where the issue is and how to adapt the blueprint properly for my Tuya controller.

Thank you in advance for your assistance!

1 post - 1 participant

Read full topic

Google Home Script Editor with Nabu Casa

$
0
0

Google has finally allowed us to start automations using triggers from devices (missing for years) this is great news for items that are tricky with HA but just work with GH like google TV etc.
Here is a link if this is news to you Link

Problem is it works great with everything except Nabu Casa provided devices. If you want to trigger based on a device provided via Nabu Casa then you have to log into Google Home and tell it to refresh every time before the automation triggers.

Seems like to option to push updates to google in HA settings is less a push and more just allowing a pull when google requests. You can also see this behavior in Google home where states do not change unless you refresh or change screens.

This is even the case where you trigger a change in google Home for a HA device you still have to refresh before GH gets the trigger.

Here is an example Automation in GH Script Editor

metadata:
  name: Switch-controlled light
  description: When a switch is on, turn on a light.
automations:
  - starters:
      - type: device.state.OnOff
        state: on
        is: true
        device: Switch_Lounge_Stereo - Lounge
    actions:
      - type: device.command.OnOff
        devices:
          - Lounge Chandelier Light - Lounge
        on: true

If I instead use a google device like turn on the TV it works no problem.

Has anyone managed to trigger anything in Google Script Editor using a device provided by Nabu Casa?

1 post - 1 participant

Read full topic

How to use Amber API?

$
0
0

Hi, I’m in Australia and trying to connect HA with the builtin Amber API/integration. This is the doco. I think I have the right API - it looks like this:
b5c7954f02dbde6eadfa6e9342ad2299 (modified from reality). When I try to use it in the integration I simply get “Invalid API key”. I can’t tell whether the request is even hitting the server and the server is responding with an error code or something else is the cause. I have seen something that says the Amber API is expecting your device to run on port 443 - is this right? Mine is running on 8123 and I haven’t got SSL working on it yet.

A little about my set up. I have a Synology NAS running “Container”. HA is loaded into this. HA was only installed a couple of days ago so it is the latest install: Home Assistant 2023.10.1 Frontend 20231005.0 - latest . I have HA talking to Fronius Invertor and smart meter

I may have posted this in the wrong place, my apologies please guide me to the best place to put it as I haven’t used this forum before

1 post - 1 participant

Read full topic

Is it possible to force Zigbee2Mqtt to trigger state_changed (or similar) even if sensor value did not changed?

$
0
0

Hi,

I’m have some sensors connected to Zigbee2Mqtt that are transmitted to HASS using Mosquitto Broker.

Those sensors send their value to Zigbee2Mqtt multiple time per hour. For example:

2023-10-10 21:31:01MQTT publish: topic 'zigbee2mqtt/sonoff_snzb_02d', payload '{"battery":100,"humidity":53.8,"linkquality":228,"temperature":23.9}'
2023-10-10 21:41:01MQTT publish: topic 'zigbee2mqtt/sonoff_snzb_02d', payload '{"battery":100,"humidity":53.8,"linkquality":228,"temperature":24.0}'

Each message contains the entire device state but only changed values are transmitted to HASS

In previous example, at 21:41 a state_changed event is sent to HASS containing only the new temperature, but the humidity is not updated because it is the same as in previous message (I observed this in the developer tools > events page).

This as three impacts:

  • First the last updated value is not updated for a sensor (it is always the same as last changed) until this sensors’ value changes and triggers a state_changed event. Here the same device has 2 different last updated values even if every payload contains both sensors values. Sometimes values are not updated for many hours
    image image

  • Second, when the value changes, if the change is big enough, then graphs draw a straight line from previous values many hours ago to the new value. In the following example the graph suggests that the line growth from 12:00 to 21:00, but the value was still 0 at 20:59
    image

  • Third, if none of the sensor’s value changes for many hours, my dashboard may suggest that the connection was lost because no update was received for too long even if zigbee2mqtt received many messages from the device during that interval

Is there a way to update the entire device state on each zigbee2mqtt event? Or am I misunderstanding how it works? (I’m pretty new at using HASS)

1 post - 1 participant

Read full topic

Turn off 10 minutes prior to sunset and off at 10:30pm

$
0
0

I’m relatively new to automations and need clarification on handling multiple triggers and actions. Ideally, I’d like the following:

  • Turn on outside light 10 minutes prior to sunset
  • Turn off outside light at 10:30pm
  • Turn on outside light if motion is detected outside between 10:30pm and 5:00am
  • Turn off outside light between 10:30pm and 5:00am if motion ceases for 5 minutes
  • 5 minute timer should restart if motion is detected during the 5 minute count down.

Thank you for anyone that can point me in the right direction. I appreciate it.

1 post - 1 participant

Read full topic

Long term statistics on sensor, that is not active for long time

$
0
0

Hi, I have problem with my gas meter sensor and long term statistics and tracking energy consumption. I don’t use gas over the summer at all, and when I just started now, the SUM was wrong. I had to recalculate the SUM field in statistics table.
I think the problem is, that the sensor disappears from the statistics_short_term table, because I don’t have any records over more than three months.
Can this be corrected? May be look up in the statistics table, when the sensor has no records in the statistics_short_term?

2 posts - 2 participants

Read full topic

Trigger call_service with target entity

$
0
0

Given that turning off the Fire TV with adb doesn’t turn off the television, I want to create a trigger that if I turn off the Fire TV from the service, the TV should also turn off. It only works if I don’t insert the “entity_id”, but I need it to turn off only if the target is the Fire TV. How can I do this?

alias: Power off TV when FireTV off
description: ""
trigger:
  - platform: event
    event_type: call_service
    event_data:
      domain: media_player
      service: turn_off
      service_data:
        entity_id: media_player.fire_tv_192_168_1_69
action:
  - service: scene.turn_on
    target:
      entity_id: scene.t_off_tv
mode: single

2 posts - 2 participants

Read full topic


Filtering attribute data

$
0
0

Hey Everyone!

I am trying to create an automation that tells me if my morning train is on time when I leave my house. In order to do this I need to filter out information I get from one of the attributes of the sensor.

If I use this - ‘{{ state_attr(‘sensor.trains_trowbridge_to_bristol_temple_meads’, ‘service’)}}’

I get this:

{
“sta”: “20:49”,
“eta”: “On time”,
“std”: “20:50”,
“etd”: “On time”,
“platform”: “1”,
“operator”: “Great Western Railway”,
“operatorCode”: “GW”,
“serviceType”: “train”,
“serviceID”: “598447TRWBRDG_”,
“origin”: {
“location”: {
“locationName”: “Salisbury”,
“crs”: “SAL”
}
},
“destination”: {
“location”: {
“locationName”: “Bristol Temple Meads”,
“crs”: “BRI”
}
}
}

I want to extract the value for “eta” and “platform” so they can be sent to me via a push notification.

Is this possible?

3 posts - 3 participants

Read full topic

Bypass automation with ios app

$
0
0

Hi, I’m thinking of starting a project with Home Assistant, but I need to carefully plan everything, and perhaps you can guide me with your experience.

I want my iOS app to override all my light automation. For instance, if an automation is set to turn on the light every 10 minutes, but I manually turn it off on my iOS app, I’d like it not to turn on automatically (perhaps with a timeout, maybe 30 minutes?).

Use Case:

In the early morning, to avoid waking everyone up, the lights should automatically turn off when there’s no motion. However, if someone needs to keep the lights on, they can bypass this automation using the app.

During the day, if the baby falls asleep in the living room, and the lights need to be off any automation that would turn on the lights would be disabled by turning it off in the app.

I was thinking of creating a bypass boolean switch and having every automation check the switch’s status before running. The iOS app button would enable or disable this switch. Is this a good approach? I’m also concerned about the possibility of an automation who don’t re-enabling the switch before 30 minutes, because the automation to crash or something and leaving the switch stuck in disabled mode. In this scenario, none of my automations would run until I manually re-enable it.

So, what do you suggest?

2 posts - 2 participants

Read full topic

Wack-a-bee

$
0
0

I launched HA 3 weeks ago (HAOS on MiniPC via Proxmox, Sonoff Zigbee stick, Zigbee2mqtt) and have been playing Zigbee wack-a-mole since. Most of my devices are Iris 3320-L contact sensors and Iris 3326-L motion sensors. They all are 5+ years old which they spent paired with SmartThings hub and worked flawlessly. The only maintenance needed was replacing batteries every 2-3 years.

Very different story on HA. Once a day or so a random sensor would become unavailable. In most cases taking battery out for 10 seconds and putting it back fixes it. When it doesn’t, nothing helps except firing up old SmartThings hub, pairing the sensor with it, and unpairing. That somehow cleanses the sensor and it connects to HA again.

Sometimes the issue is failure to update open/closed status. It would say it’s closed despite it being open or vice versa. While reporting temperature and battery status without an issue. Taking the battery out and putting it back in fixes it. Until the next sensor.

There is no rhyme or reason which devices will stop working. The proximity to the zigbee stick or LQI seem to have no impact. I also have several GE zigbee lights and they do the same. But turning the power off/on always fixes them.

Looking for dead sensors and reinserting the battery to bring them back to live became a nightly chore. It’s starting to get old. How can I get the Zigbee network reliability in par with what I had with SmartThings?

3 posts - 3 participants

Read full topic

DuckDNS fails to create cert

$
0
0

I’m trying to set up DuckDNS addon but after filling in the configuration and starting the addon I get this in the log:

 + Deploying challenge tokens...
OK + Responding to challenge for xxxxx.duckdns.org authorization...
 + Cleaning challenge tokens...
OK + Challenge validation has failed :(
ERROR: Challenge is invalid! (returned: invalid) (result: ["type"]	"dns-01"
["status"]	"invalid"
["error","type"]	"urn:ietf:params:acme:error:unauthorized"
["error","detail"]	"Incorrect TXT record \"\" found at _acme-challenge.xxxxx.duckdns.org"
["error","status"]	403
["error"]	{"type":"urn:ietf:params:acme:error:unauthorized","detail":"Incorrect TXT record \"\" found at _acme-challenge.xxxxx.duckdns.org","status":403}
["url"]	"https://acme-v02.api.letsencrypt.org/acme/chall-v3/272738501986/-dYCJA"
["token"]	"xxxxxxxxxxxxxxxxxxxxxxxxxx"
["validated"]	"2023-10-11T04:54:37Z")

2 posts - 2 participants

Read full topic

Comparing today's month and day to a static month and day

Energy bill tracker

$
0
0

I need some help with how i could implement a bill tracker.

I have a sensor setup to track the daily price for supply of energy and the two tracking costs (export and import).

I want to create a sensor that can show me the value (sum) of the three on my main dashboard. The catch is it needs to show this value since the 14th of each month, so the calculations need to show this based on when you are looking at the dashboard.

I thought it would be a good way to show what the current months bill is looking like.

Anyone have any ideas on how I can achieve this?

1 post - 1 participant

Read full topic

Shelly Integration not working properly fgollowing updates

$
0
0

Hello all

I have several shelly dimmable lights and a few RGBW

Every time i need to restart HA i get a warning that ALL the shelly devices failed to update. ok

I then go to the shelly dashboard and i check all my devices

in each of my devices the entity “to update” tells me that the device is update
I go to the device IP address and check for update… non are available

I deleted the addon and ree pairred the devices … no joy

These error messages are very annoying and waste time

How do i fix this, what next?

Thank you for your help

1 post - 1 participant

Read full topic


Restart Home Asistant runing as Proxmox VM fail

$
0
0

I have the problem that when I try to completely restart the HA using the UI it gets stuck.

I can still see the following message on the Proxmox console
gpio_stub_drv gpiochip0: removing gpiochip with gpios still requested

I can then no longer access HA and have to stop the VM hard in Proxmox.

1 post - 1 participant

Read full topic

Template sensor state "unknown" while template resolves correctly

$
0
0

I have defined this template sensor to check when a motion was last detected.

template:
  - sensor:
      last_motion_detected_loc_2:
        friendly_name: Laatste beweging Locatie 2
        value_template: >
          {% if states.binary_sensor.locatie_2_pir_sensor.last_updated is unknown %}{{"00:00:00"}}
          {% else %} {{ as_timestamp(states.binary_sensor.locatie_2_pir_sensor.last_updated)|timestamp_local }}
          {% endif %}
        unit_of_measurement: 's'

The template resolves correctly under dev_tools, giving me the following string “2023-10-11T09:12:02.671519+02:00”

sensor.last_motion_detected_loc_2 results in state “unknown”.

:exploding_head:

1 post - 1 participant

Read full topic

Long term statistics (how to remove from database)

$
0
0

I have some long term statistics for which “This entity is no longer being recorded”:

Choosing to “Fix” these only gives some information:

image

The offending entities are as it says excluded from Recorder.

How can I remove them from the database?

1 post - 1 participant

Read full topic

Interesting but unimportant

Speak voice, save to temporary audio file, playback that file over TTS?

$
0
0

Has anyone managed to do something similar?

I have TTS configured using: GitHub - s-knibbs/snapcast-ha-player: Home Assistant custom integration to enable TTS playback through a snapcast server

Basically I can play any HA local audio file, so I thought of just saving preset mp3 files to talk with my dog, but then I realized it would be way better if I could somehow speak whatever I want to my phone or browser, have that audio saved to a temporary mp3 file, and then have that file played back over TTS.

1 post - 1 participant

Read full topic

Viewing all 108261 articles
Browse latest View live


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