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

Bitwise operation in a template Template

$
0
0

I’ve got an mqtt sensor…

  - platform: mqtt
    unique_id: sunny_mqtt_0019
    name: "Owl Intuition Heating State"
    state_topic: "tele/owl/heating"
    value_template: "{{value_json['Heating'].State}}"
    force_update: true

The state can be any number 0-7. Bit 1 means the Hall Thermostat is demanding heating.
I want to create a binary template sensor that does a bitwise AND with 1 to tell me that heating is or isn’t being demanded. I’ve looked at the template documentation but cannot work out the syntax.
I could also do it with something like in(1, 3, 5, 7) or even just a series of ifs, but feel a bitwise operation is the most elegant solution.
Can someone help me here?

1 post - 1 participant

Read full topic


Calculation in blueprint variable is off

$
0
0

I’m testing a blueprint to control my thermostat and I’m finding that the calculations in the blueprint display strange results some times. what i’m finding is that the calculation is adding inserting additional decimals.

this is my calculation:
heat_temp_1: “{{ (target_temp_1 - heat_tolerance) - actual_temp_1 }}”

and here are the values i’m passing in the calculation for a particular run.
heat_tolerance: 1,
target_temp_1: 22.5,
actual_temp_1: 21.1,

however this is the result:
heat_temp_1: 0.3999999999999986,

I expect the result to be 0.4 not 0.3999999999999986

the weird thing is that it always seems to be off by 0.0000000000000014 or 0.0000000000000007 either positive or negative.

Similar issue happening on a second calculation for cooling, but that one seems of by 0.0000000000000001 instead.

this is causing me issues when the target and actual temps are off by the heat tolerance value as it executes the wrong command, its also just weird. Not sure where the extra value are coming from as the values of the actual temp reading which is the only item coming from a sensors seem to be reported to the first decimal only.

here are some log output that show the problem
image

image

its not a major issue since most of the time it just accelerates the action that was going to happen on the next run, or delays it to the next run, but something feels off.

for reference this is the blueprint template, which is still a work in progress.
thermostat.yaml (github.com)

1 post - 1 participant

Read full topic

CC2531 ZHA and installation / extension to the network

$
0
0

Hi

I want to use my unused cc2531 from Aliexpress.
I’m not sure if it working correctly.

Little Context :
At first I had a HA using Docker (HA Core?) , and plugging the device IN doesn’t did anything.

So I switch to something easier to manage (I could find how to give access to my usb dongle to Docker)

Now I’m running it in HA OS + the new 3.0 Sonoff
But I would like to extend my network with it or find something to do with it

So :
1- It should come preflashed but I can’t find a may to confirm it
2-Do I new to look for a “router” firmware ?

been looking for a few link but couldn’t find something reliable enough for me

Thank you

1 post - 1 participant

Read full topic

Repeat is an invalid option for script

$
0
0

Thought I was being clever since my Iris Z-Wave thermostats aren’t always responsive to changing the target temp and implemented a repeat until option via script, but the config isn’t working. Any idea what might be wrong here?

set_upstairs_temp:
  alias: "Set upstairs thermostat target high and low temperatures"
  fields:
    target_high:
      description: Target temperature for when to engage A/C
      example: 80
    target_low:
      description: Target temperature for when to engage heat
      example: 68
  repeat:
    until: "{{ is_state('climate.radio_thermostat_company_of_america_ct101_thermostat_iris_mode_2.hvac_mode', 'heat_cool') and is_state('climate.radio_thermostat_company_of_america_ct101_thermostat_iris_mode_2.fan_mode', 'Auto low') and is_state('climate.radio_thermostat_company_of_america_ct101_thermostat_iris_mode_2.target_temp_high' | float, target_high | float) and is_state('climate.radio_thermostat_company_of_america_ct101_thermostat_iris_mode_2.target_temp_low' | float, target_low | float) and repeat.index < 10 }}"
    sequence:
      - service: climate.set_fan_mode
        data:
          entity_id: climate.radio_thermostat_company_of_america_ct101_thermostat_iris_mode_2
          fan_mode: Auto low
      - service: climate.set_temperature
        data:
          entity_id: climate.radio_thermostat_company_of_america_ct101_thermostat_iris_mode_2
          hvac_mode: heat_cool
          target_temp_low: "{{ target_low | float }}"
          target_temp_high: "{{ target_high | float }}"

7 posts - 4 participants

Read full topic

Better way to highlight offline devices?

$
0
0

I currently have a card that shows all my Aqara temp sensors and when they last got updated. Is there any way to change their icon or do something to easily spot those that have not had an update in the last hour?
Better yet, is there any kind of card that would JUST display specific entities that have not receive an updated for an hour?

1 post - 1 participant

Read full topic

Unable to rename automation created from blueprint

$
0
0

If I create an automation from a blueprint, it lets me edit the name but it does not use that name. It just stays at “New Automation” after I click Save. If I edit the existing automation and change the name, I do not get a “Save” button.

If I create a normal automation without using a blueprint, I’m able to change its name just fine.

Why am I not able to rename my automation if I use a blueprint?

1 post - 1 participant

Read full topic

Moes Zigbee No Neutral ZTS-US

$
0
0

Hi, I just bought a Moes Switch

MOES ZigBee Wall Light Switch ZigBee 3.0 No Neutral Wire/N+L Wiring, No Capacitor
Tuya 2/3 Way Remote Control, 2MQTT,1 Gang White

The zigbee2mqtt said it’s not compabible, and after I follow this instructions :
Support new Tuya devices.

now the zegbee2mqtt dasboard show the manufacturer and model but still doesn’t working

can anyone helpme?

1 post - 1 participant

Read full topic

Tasmotized Sonoff basic not discovered

$
0
0

I flashed a Sonoff Basic switch and can browse to the device. The host is my HA IP address, and the user/pw are correct for my installation. Every other setting on the sonoff is what it says by default. My MQTT Broker add-on log shows this:

1647275179: New connection from 192.168.1.212 on port 1883.
{“result”: “ok”, “data”: {}}1647275179: New client connected from 192.168.1.212 as DVES_E83860 (p2, c1, k30, u’mqttuser’).

When I try to add the device through the integration, the status ring just spins and never finds it. I’ve read through the troubleshooting and can’t figure out why this device can’t be added. It’s driving me crazy that I was able to flash it with no problem (apparently that’s more difficult), but can’t get the easy part to work. lol

I’m running Hass 7.4 with HA 20223.4 on Raspberry Pi 4b with a HUSBZB-1 USB. This is the first device I’m trying to add through this hub.

3 posts - 3 participants

Read full topic


Time of Day heating blueprint/selecting time of day

$
0
0

I’ve got a bunch of binary Sensors

- platform: tod
  name: MORNING
  after: "05:00"
  before: sunrise

- platform: tod
  name: DAY
  after: sunrise
  before_offset: "-01:00"
  before: sunset

- platform: tod
  name: EVENING
  after: sunset
  after_offset: "-01:00"
  before: "22:00"

- platform: tod
  name: LATEEVENING
  after: "22:00"
  before: "23:00"

- platform: tod
  name: NIGHT
  after: "23:00"
  before: "05:00"

I’ve got automations that trigger of the change to DAY and to do something. Working well.

But I want to be able to evaluate “what is my current tod”. In my brain that needs to be a “thing” that I can ask is it DAY or is it MORNING.

I’ve tried putting them in a group:

times_of_day:
  name: Times of Day
  entities:
    - binary_sensor.NIGHT
    - binary_sensor.MORNING
    - binary_sensor.DAY
    - binary_sensor.EVENING
    - binary_sensor.LATEEVENING

But I’m not sure thats what I want either. Ultimately I want to use these in a blueprint for heating (shamelessly pulled from : Home Assistant Blueprint For Heating (github.com) ) , so I can say, if DAY then here is a threshold to use for heating, if MORNING then here is a different threshold for heating.

Here’s the trigger part of the blueprint where i’m trying to evaluate for the user having selected binary_sensor.DAY that I’m in that time period.

trigger:
- platform: homeassistant
  event: start
- platform: event
  event_type: automation_reloaded
- platform: time_pattern
  minutes: /1
action:
- choose:
  - conditions:
    - condition: numeric_state
      entity_id: !input 'temp_sensor'
      below: !input 'min_temp'
    sequence:
    - service: input_boolean.turn_on
      target:
        entity_id: !input 'heating'
  default:
  - service: input_boolean.turn_on
    target:
      entity_id: !input 'heating'
mode: single

Its the condition other than temperature I’m trying to figure out.

1 post - 1 participant

Read full topic

Local devices and services using external url

$
0
0

I’ve been pulling my hair out trying to figure out why my local devices are all trying to use my external url. I’ve got home assistant in docker and all my IOT devices on the same vlan. The external URL is a domain I own port forwarded to my home-assistant hub and has a SSL cert managed by a proxy server. My internal url is a non secure regular local IP address. Most of my devices want to use the address of my external url which works ,but the return address is the vlan router which in this case is 192.168.2.1 . This sort of works expect when the traffic gets heavy the signals start getting mixed up and I get weird errors like authentication errors, or incorrect data type errors. My internal url works just fine it’s just the device always choose the external url.

My question is how do integrations and devices decide which url to try to report back to? How can I make my local devices use my local url instead of my external url when they don’t have that configuration option?

1 post - 1 participant

Read full topic

Close shutters if sun rises early

$
0
0

Hey community,

I want to automate shutters based on the expected sunrise time. I am still fairly new to home assistant. I think this should be easily possible but I am somewhat stuck with how to define the condition.

I would like to close shutters at 3:00 am if the sunrise will be before 6:30 am.

So I think the trigger would be “3:00 am” and for the condition I can maybe use the ‘next-rising’ attribute, but I don’t know how. Any support would be highly appreciated.

alias: close shutters
description: ''
mode: single
trigger:
  - platform: time
    at: '03:00:00'
condition:
  - condition: state
    entity_id: sun.sun
    attribute: next_rising
action:
  - device_id: xyz
    domain: cover
    entity_id: zyx
    type: set_position
    position: 0

1 post - 1 participant

Read full topic

HACS being downgraded

$
0
0

Hi guys,
What is going on with HACS?
Yesterday it offers me downgrade to version 1.19.3 from higher version which I unfortunatelly didn’t memorise. After I did it, several installed components offers downgrade too.
This morning HACS offers downgrade to version 1.19.2.
???

1 post - 1 participant

Read full topic

Roller Blind Automation - I just want to see the sunrise :D

$
0
0

I wanted to avoid starting another thread on the subject of roller blind and sun automation, but I just can’t get the right result.

My conditions:

  • Roller Blind should be closed when it is dark
  • Roller Blind should be open when it is bright
  • be able to see the complete sunrise
  • be able to see the complete sunset

I have now clicked together several autmations via GUI and none was good enough. The sunset automations were always triggered when the sun was not yet fully down. So I could not see the whole sunset. It was the other way around with the sunrise. Here too, my previous automations were always too early, but rather too late.

My last attempt was to work with an offset but this is apparently also difficult to estimate. I would like to have an automation that always works, so in all four seasons.

Here is my last attempt:

alias: BlindUpBySunUp
description: ''
trigger:
  - platform: sun
    event: sunrise
    offset: '-00:30:00'
condition: []
action:
  - device_id: 371085df03025174f783997aa1fcb5ab
    domain: cover
    entity_id: cover.cover_kue
    type: set_position
    position: 100
mode: single

I suppose it would be useful to work with azimuth or elevation, but I don’t know which value to use to meet my conditions.

Greetings by JamieMe

1 post - 1 participant

Read full topic

Automation keeps repeating

$
0
0

Hi. I have two automations set up as temperature alarms according to below. One is triggered above 25 degrees, and the second one is returning to normal (below 25 degrees). The problem is that the second automation keeps repeating every 20-30 minutes or so after being triggered once (i.e. being below 25 degrees). Is there any way to stop this?

I want to avoid adding a delay since that would stop the alarm from triggering more than once should the temperature actually fluctuate between >25 - <25 within the time of delay.

- id: '1647165519569'
  alias: Low temp
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: sensor.test_2
    for:
      hours: 0
      minutes: 0
      seconds: 5
    below: '25'
  condition: []
  action:
  - service: notify.gmail
    data_template:
      title: Temperature to normal in:" {{ trigger.to_state.attributes.friendly_name
        }} "
      message: Temperature of {{ trigger.to_state.attributes.friendly_name }} restored
        to normal. Current temperature is {{ trigger.to_state.state }} {{ '°C' }}
  - service: notify.group1
    data_template:
      title: Temperature to normal in:" {{ trigger.to_state.attributes.friendly_name
        }} "
      message: Temperature of {{ trigger.to_state.attributes.friendly_name }} restored
        to normal. Current temperature is {{ trigger.to_state.state }} {{ '°C' }}
  mode: single

1 post - 1 participant

Read full topic

HAOS on Debian and Apparmor. Docker fails. Gurus needed

$
0
0

Followed the unsapported the installation path. Everything is fine and working. Until i decided to remove apparmor. Upon doing that container ls showed nothing. Wen through the internet. Found out that the cause might be because of snapd. Installed apparmor and snapd back. Now the containers show up (xx in id brought intentionally)

sudo docker container ls -a
CONTAINER ID   IMAGE                                                      COMMAND                  CREATED        STATUS                      PORTS                  NAMES
9ff5dc9xx435   homeassistant/amd64-addon-mosquitto:6.0.1                  "/init"                  39 hours ago   Exited (129) 36 hours ago                          addon_core_mosquitto
8772568xx4c0   ghcr.io/home-assistant/amd64-hassio-multicast:2022.02.0    "/init"                  39 hours ago   Exited (0) 36 hours ago                            hassio_multicast
745a95xx620c   ghcr.io/home-assistant/amd64-hassio-audio:2021.07.0        "/init"                  39 hours ago   Exited (0) 36 hours ago                            hassio_audio
2d1abxx74a8a   ghcr.io/home-assistant/amd64-hassio-dns:2021.06.0          "/init"                  39 hours ago   Exited (0) 36 hours ago                            hassio_dns
00910xx37bc1   ghcr.io/home-assistant/amd64-hassio-cli:2021.12.0          "/init /bin/bash -c …"   39 hours ago   Exited (0) 36 hours ago                            hassio_cli
f44c1xx58834   ghcr.io/home-assistant/qemux86-64-homeassistant:2022.3.4   "/init"                  42 hours ago   Exited (0) 36 hours ago                            homeassistant
d5594xxf354d   homeassistant/amd64-addon-zwave_js:0.1.54                  "/init"                  42 hours ago   Exited (0) 36 hours ago                            addon_core_zwave_js
812f6xxd4a85   esphome/esphome-hassio-amd64:2022.2.6                      "/init"                  42 hours ago   Exited (129) 36 hours ago                          addon_a0d7b954_esphome
8706xx7cc10c   zigbee2mqtt/zigbee2mqtt-amd64:1.24.0-1                     "/init"                  42 hours ago   Exited (129) 36 hours ago                          addon_45df7312_zigbee2mqtt
bba9dxx6fca7   ghcr.io/hassio-addons/node-red/amd64:11.0.4                "/init"                  42 hours ago   Exited (0) 36 hours ago                            addon_a0d7b954_nodered
85d6axx93535   homeassistant/amd64-addon-configurator:5.3.3               "/init"                  42 hours ago   Exited (0) 36 hours ago                            addon_core_configurator
ffd2exx4d5cd   ghcr.io/home-assistant/amd64-hassio-supervisor             "/init"                  44 hours ago   Exited (0) 36 hours ago                            hassio_supervisor
cdf5dfxx99dc   ghcr.io/home-assistant/amd64-hassio-observer:2021.10.0     "/init"                  3 weeks ago    Up Less than a second       0.0.0.0:4357->80/tcp   hassio_observer

But they don’t auto start. And trying to start them manually gives this

$sudo docker run -d --restart unless-stopped hassio_supervisor
Unable to find image 'hassio_supervisor:latest' locally
docker: Error response from daemon: pull access denied for hassio_supervisor, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

How can this be fixed?

1 post - 1 participant

Read full topic


Automation not triggered as it should

$
0
0

Hi guys,

I’m new to HA. I love this framework but I need you help.

It is installed on a VM running on my QNAP with a sonoff zigbee usb dongle.

I’m using it right now to pilot my heaters. In every room I have a zigbee temp sensor and a zigbee plug to power the heater.

In the living room, I want the temp around 20° C from 7h30 to 23h and 19 otherwise. But the automation to turn on the power plug does not trigger. I have no entries for this automation in the logbook.

This is the temp sensor

This is the automation

alias: Chauffage Salon Journée Démarrage à 19.7° 7h30 - 23h
description: Démarrage chauffage la journée
trigger:
  - type: temperature
    platform: device
    device_id: efd0732046d98a3eb1816b5531c09c46
    entity_id: sensor.lumi_lumi_weather_b29fdf07_temperature
    domain: sensor
    below: 19.7
    for:
      hours: 0
      minutes: 0
      seconds: 10
condition:
  - condition: time
    after: '07:30:00'
    before: '23:00:00'
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
action:
  - type: turn_on
    device_id: fca90528869e1f85e56a4cfa46ed8d40
    entity_id: switch.tz3000_kx0pris5_ts011f_16217a6e_on_off
    domain: switch
mode: restart

1 post - 1 participant

Read full topic

State map not working as expected

$
0
0

Dear all,

I am trying to set a hue bulb color based on the next garbage to be collected.
I was able to brake the issue down to my map.

{% set map = {'papier': 'green', 'Mobile Problemabfallsammlung in Burgoberbach, biotonne': 'orange', 'biotonne': 'brown', 'gelberSack':
    'yellow', 'restmuell': 'blue'} %} {% set state =
    states('states.sensor.abfallnaechster.attributes.values()') | first  %}  {{ map[state] if state
    in map else states.sensor.abfallnaechster.attributes.values() | first }}

executed in developer tools template results in “Mobile Problemabfallsammlung in Burgoberbach, biotonne”
However I would expect “orange”.

I am quite new to HA so please excuse if any important information is missing

1 post - 1 participant

Read full topic

Mqtt autodiscovery - customization for hvac_modes?

$
0
0

Hi, I have Zigbee2Mqtt , and Moes BRT-100 TRV, which is correctly connected and discovered in HA.

But, in “hvac_modes” there are too many modes (cool, fan, etc), while I need only “off” and “heat”. There is no “modes” on mqtt autodiscovery message.
If I send (manually) customized MQTT autodiscovery message , I can see no more “cool” or “fan” icons on thermostat card - so all good.
My question is - how to make it happen automatically on autodiscovery, instead of me pushing custom MQTT autodiscover message ?

1 post - 1 participant

Read full topic

Cannot open HA after using 2 factor authorisation

$
0
0

Hi there

After getting notified about failed login attempts every couple of seconds, I thought I’d turn on 2FA.
It was fine. I could log out and log back using google authenticator.
But the next time I had to restart HA, it failed to come back up.
When connecting via my duckdns, it refuses access.
I can still login using http://192.168.xx.xx:8123 and I turned 2FA back off again and re-started. But it still won’t connect via my duck dns.

Anyone have any suggsetions on where to start fixing this?

Many thanks

1 post - 1 participant

Read full topic

GoodWe converter can't be added a solar porduction source in enegery dashboard

$
0
0

Hi,

Today a GoodWe GW4K-DT was installed in my house with firmware version 10.10.b. I’ve connected it to my wifi network and ran the GoodWe Inverter integration. Just had to enter the local IP4 address and that was it, 3 sensors and 33 diagnostics we added. :slight_smile:
The 3 sensors ID’s are: pv_power (W), today_s_pv_generation (kWh) and total_pv_generation (kWh).

My next step was adding it to the enegery dasboard as solar production source but it doesn’t show.
I expected that sensor.total_pv_generarion entity was listed but it isn’t. The last option in the drowndown is ‘Why is my entity not listed?’ and that shows this information: Expected data source not listed - Home Assistant. It looks like that the integration is not properly configured (yet).

@mletenay, can you please help me out with this?

Core version: 2022.3.5
Supervisor version: 2022.03.4
Host version: 7.4

1 post - 1 participant

Read full topic

Viewing all 106762 articles
Browse latest View live


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