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

New Setup: Sonoff switch not toggling on

$
0
0

@SA_guy wrote:

I am rebuilding my HA setup, running Home Assistant on Docker and the Mosquito Docker container as well.

My configuration.yaml file currently looks like this:

mqtt:
  broker: 192.168.87.190
  port: 1883
  username: !secret mqtt_username
  password: !secret mqtt_password

switch:
  platform: mqtt
  name: "Sonoff Passage 1"
  command_topic: "cmnd/sonoff_t1_passage/POWER1"
  state_topic: "stat/sonoff_t1_passage/POWER1"

Then on my T1 Sonoff Switch that has been flashed with Tasmota I have setup the MQTT as such:

On the console within my Tasmota device it doesn’t look like there are any issues:

Going back to Home Assistant I can see the Switch on my Overview page:

When I click to toggle it moves, and a second later moves back - without have changed the state of the light at all. Switching the light on in the Tasmota GUI of the switch works, but doesn’t update the state on the HA page.

What am I missing, or what other information can I provide to help?

Posts: 4

Participants: 2

Read full topic


Error when configuring timing duration using template

$
0
0

@theone wrote:

I am trying to use a the timer.start service in a script. The duration should be configured using an input.number entity “irrigation_set_time”.

  • I tried using both the time format HH:MM:SS and the seconds - both return errors.

HH:MM:SS code:

service: timer.start
data_template:
        entity_id: irrigation_timer_cycle_duration
        duration: "{{ states('input_number.irrigation_set_time') | int | timestamp_custom('%H:%M:%S',false) }}"

error:

Failed to call service timer/start. offset {{ states('input_number.irrigation_set_time') | int | timestamp_custom('%H:%M:%S',False) }} should be format 'HH:MM' or 'HH:MM:SS' for dictionary value @ data['duration']

Integer code:

service: timer.start
data_template:
  entity_id: irrigation_timer_cycle_duration
  duration:
    seconds: "{{ states('input_number.irrigation_set_time') | int }}"

error:

Failed to call service timer/start. expected int for dictionary value @ data['duration']['seconds']
  • The same errors appear when I run the service and data_template using the “Service” menu in “Development Tools”.
  • I tried the template {{ }} code in “Template Editor” (under “Development Tools”) and it returned the correct format in both cases (HH:MM:SS format and integer respectivley)

What is puzzling it that I tried running the same HH:MM:SS code using the delay function and it worked OK.

delay: "{{ states('input_number.irrigation_set_time') | int | timestamp_custom('%H:%M:%S',false) }}"

What could me the problem? Using latest HA 0.108.3

Posts: 1

Participants: 1

Read full topic

Automation help (run once?)

$
0
0

@Makis wrote:

Hi
I have the following automation which close the tent when is windy.
Since it is cover but it doesn’t have a state (on-off) I am wondering if there is a way to run only once (if the wind speed is more that 40 (km/h). I would like the automation to run again after someone opens the tent 5-6 hours or a day later.
Can this be done somehow?

  • I haven’t use any input boolean logic before so it feels right now difficult to implement.
#Tent Tent_windy        
- id: Tent_windyy
  alias: Tent windy
  trigger:
    platform: numeric_state
    entity_id: sensor.wind_speed_automation
    above: 40
  action:
    - service: cover.close_cover
      entity_id: cover.50758014840d8e918614

Posts: 12

Participants: 4

Read full topic

Error updating Home Assistant

$
0
0

@Hoeiendag wrote:

Hi,

Strange problem here. Running home assistant on esxi, Home Assistant Core. Updated ESXi to 7. It looks like since then, but I’m not sure, I cannot update Home Assistant. Some data is getting in like Buienradar. From the console I can ping other vm’s, but i cannot ping the gateway. But from my mobile app I can access on 4G (so not wifi) my Home Assistant server and control the lights. But notifications do not arrive.

Here’s a bit of the log:

20-04-14 12:37:33 INFO (SyncWorker_1) [supervisor.docker.interface] Pull image homeassistant/amd64-hassio-dns tag 9.
20-04-14 12:37:49 ERROR (SyncWorker_1) [supervisor.docker.interface] Can’t install homeassistant/amd64-hassio-dns:9 -> 500 Server Error: Internal Server Error (“Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”).
20-04-14 12:37:49 ERROR (MainThread) [supervisor.dns] CoreDNS update fails
20-04-14 12:37:49 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished coro=<Tasks._update_dns() done, defined at /usr/src/supervisor/supervisor/tasks.py:218> exception=CoreDNSUpdateError()>
Traceback (most recent call last):
File “/usr/src/supervisor/supervisor/tasks.py”, line 224, in _update_dns
await self.sys_dns.update()
File “/usr/src/supervisor/supervisor/dns.py”, line 182, in update
raise CoreDNSUpdateError() from None

I cannot find or access this file.
ESXi reboot and many reboots of the system and server did not help. Strangely enough, it can find updates but cannot access those

Please help.
Regards,
Renzo

Posts: 1

Participants: 1

Read full topic

Repeating a service (or script)?

$
0
0

@alexmo wrote:

Hello,
There is an option to run a service (or script) in loop ?
Means, can the service repeat 10 times (without a delay) ?

The following is my automation that play a shot sound, and I wants to repeat this sound for 10 times.

- alias: 'The house was flooded with water notification'
  trigger:
    platform: state
    entity_id:
      - binary_sensor.storage_water_sensor
    from: 'off'
    to: 'on'
  action:
    - service: media_player.play_media
      data:
        entity_id: media_player.alex_s_echo_dot
        media_content_type: sound
        media_content_id: amzn_sfx_church_bell_1x_02

Please advice.

Thanks.

Posts: 12

Participants: 4

Read full topic

Unifi presence detection not working?

$
0
0

@membersound wrote:

I installed the unifi controller addon. All my APs show up correctly, everything is fine.

Now I’m trying to set up presence detection. But how is this being done correctly? I added the following to configuration.yaml, and get an error:


device_tracker:
  - platform: unifi
    #host: 192.168.178.109
    username: myuser
    password: mypw

I tried with and without setting the host. Both produce the following error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/__init__.py", line 129, in async_setup
    legacy_platforms = await setup.async_extract_config(hass, config)
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 112, in async_extract_config
    f"Unable to determine type for {platform.name}: {platform.type}"
ValueError: Unable to determine type for unifi: None

I have no device_tracker.yaml set up so far, and the file is not present.

What I noticed: under Configuration > Integrations, I don’t see the Unifi Controller listed. I can only see and access it via the Add-On tab. Is that correct? Or should it be listed in Integrations? If yes, how can I achive this?

Posts: 2

Participants: 2

Read full topic

Configure extra sensor for setting camera entity as (in)active

$
0
0

@Boggie wrote:

I have a webcam running and showing in home assistant configured like this:

camera:
  - platform: mjpeg
    name: mycam
    still_image_url: "http://mycam.local/snapshot"
    mjpeg_url: "http://mycam.local/stream"

It shows up as always Inactive, since it has no motion detection.

But what if I have a way to see if there are motion (like motioneye) that I can use to set a secondary sensor (maybe via MQTT) to active or inactive.

Can I somehow configure a hybrid camera that takes the image from still_image_url and mjpeg_url but the active/inactive from another sensor (or even just directly from an MQTT topic)?

Please say yes :smiley:

Posts: 1

Participants: 1

Read full topic

How to use templates with picture-elements card?

$
0
0

@csacre wrote:

Hi,

I start playing with the “picture-elements”.
I would like to change dynamically the background-color when the “humidity” of one sensor is above 50% (visual feedback, kind of alerting).

I am back to even a more basic question: is templating supported in this card ?
As an example below, I simply try to have the “Title” being displayed dynamically without success

But when reopening the editor (in lovelace), the row

{{ states(‘counter.presence_hall’)}}
has been replaced by
’[object Object]’: null

Any idea or alternive for my main objective (change background-color when sensor above a given numeric value) ?

    cards:
      - elements:
          - entity: sensor.zigate_00158d00034f8c03_temperature
            style:
              left: 25%
              top: 57.5%
            title: température
            type: state-label
          - entity: sensor.zigate_00158d00034f8c03_humidity
            style:
              left: 25%
              top: 59.2%
            title: {{ states('counter.presence_hall')}}
            type: state-label
        image: local/Thines3.jpg
        type: picture-elements

Posts: 3

Participants: 3

Read full topic


Cast Automation isn't working

$
0
0

@ptrsnja wrote:

Hi community,

I’m having trouble figuring out an issue with an automation I’m building. It involves casting a view to a Google Nest Hub, which works as expected when I make a manual call from the services panel in the UI, but the automation won’t work properly.

This is working:
image

This is not
image

Here’s the error message I’m getting:

Logger: homeassistant.components.automation
Source: helpers/script.py:693
Integration: Automation (documentation, issues)
First occurred: 12:16:26 PM (1 occurrences)
Last logged: 12:16:26 PM
Cast Laundry Status: Error executing script. Invalid data for call_service at pos 1: value should be a string for dictionary value @ data[‘entity_id’]

Posts: 1

Participants: 1

Read full topic

Sonoff power on state vs switch

$
0
0

@Himdola wrote:

Hello Guys,

I thing this is a simple question which already use sonoff but for me is that to difficult.

What i have;

  • Sonoff mini with tasomta -> connected on the Ceiling and the bulb connected to sonoff mini.
  • I have a normal wall Switch.

Question: I need, when i use the normal switch and turn on, i will always that the bulp turn on wherever it is turned OFF via Home Assistant.

It is now so when i turned off the sonoff via Home Assistant and turn on via normal wall switch the bulb will go on and after 4 seconds it is gooing off.

Current config file"

platform: mqtt
name: “xxx”
state_topic: “stat/xxx/POWER”
command_topic: “cmnd/xxx/POWER”
qos: 0
optimistic: false
payload_on: “ON”
payload_off: “OFF”
payload_available: “Online”
payload_not_available: “Offline”
retain: true

Posts: 1

Participants: 1

Read full topic

Vanderbilt SPC

Don't push template change

$
0
0

@Valentino_Stillhardt wrote:

Hi everyone,

I’m writing a template_sensor which should fetch another sensor and do some basic calculations.

Basically I’m using:

  - platform: template
    sensors:
      all_3_phases_power:
        friendly_name: "All Phases Power"
        value_template: >-
          {% set phases = (states('sensor.phase_1_power') | float + states('sensor.phase_2_power') | float + states('sensor.phase_3_power') | float) | round(2) %}
          {% set phase_1_updated = (now().timestamp() - states.sensor.phase_1_power.last_changed.timestamp()) < 1 %}
          {% set phase_2_updated = (now().timestamp() - states.sensor.phase_2_power.last_changed.timestamp()) < 1 %}
          {% set phase_3_updated = (now().timestamp() - states.sensor.phase_3_power.last_changed.timestamp()) < 1 %}
          {% set all_phases_updated = phase_1_updated and phase_2_updated and phase_3_updated %}
          
          {% if phases != 'unavailable' and phases > 0.0 %}
          {% if all_phases_updated %}
          {{ phases | float | round(2) }}
          {% endif %}
          {% else %}
          {{ 'unavailable' }}
          {% endif %}
        unit_of_measurement: "W"
        icon_template: mdi:power

The problem is if all_phases_updated is False, the sensor gets an empty value, and I just want it to stay at the last value (Not pushing the value).

The reason I need to push if all_phases_updated is True is because it updates 3 times in rapid sucession to every update in the 3 phases (every 5s), so I watch first if all 3 phases have updated in the last 1 sec and only then push the value to the template.

So, the question is: How do I avoid a empty value in the template when the value isn’t “ready” (aka. How do I not push a value to the template/ignore this iteration)?

Thanks in advance

Posts: 6

Participants: 2

Read full topic

Renaming sensors in configuration.yaml doesn't work

$
0
0

@hneel wrote:

I had given some of my sensors (rfxtrx, mqtt, template) in configuration.yaml unlogical names, so I decided to rename some of them. But the old ones still remain in home assistant (for example Lovelace and Developer Tools states) and the new ones don’t show up. I tried retarting HASS from the File Editor menu and rebooting from the Supervisor menu, but this had no effect. I even deleted the home-assistant_v2.db to let it start from scratch, but even then the old names were kept.

Where does it store the names and how can I enforce the changes I made in the yaml files.

Posts: 3

Participants: 2

Read full topic

Template sums wrong value

$
0
0

@Valentino_Stillhardt wrote:

I have an simple template which sums 3 phases together {{ phase_1_power + phase_2_power + phase_3_power }} and it works fine - sometimes.

image

Sometimes the total value is only adding one phase, evaluating others as zero (as it seems), but why? It hasn’t become unavailable.

Thanks for any help.

EDIT: The exact template is here

Posts: 1

Participants: 1

Read full topic

Duplicate System Generated Users for Home Assistant Cast

$
0
0

@sbowater wrote:

I am seeing duplicate entries for system-generated users named “Home Assistant Cast” – seven of them at last count (see screen snip below).

Is there any way to clean this up as I assume I only need one? When I click in to any of them they are tagged “System Generated” and “Active”. The Administrator switch is “on” and the “DELETE” and “UPDATE” buttons are greyed out so there’s no action possible via the UI as best I can tell.

(HA 0.108.3)

Posts: 1

Participants: 1

Read full topic


Upgraded Thermostat, need to remove my Nest

$
0
0

@odinb wrote:

Recently upgraded my AC, and as part of that, I got a new thermostat (Lennox iComfort S30) since the Nest does not support multistage HVAC systems!

I am now stuck with both of my old Nest Thermostats still on my HomeAssistant Overview!

I have 2 Nest Thermostats, and 3 Nest Protect, and obviously want to keep the Protects there, but remove the now obsolete thermostats!

I have an active developer account configured in my integration if that makes a difference.

My current configuration.yaml has:

Nest

nest:
client_id: !secret nest_client_id
client_secret: !secret nest_client_secret
sensors:
monitored_conditions:
- ‘co_status’
- ‘smoke_status’
- ‘battery_health’
- ‘color_status’

What do I need to remove/clean to remove the 2 thermostats, but keep the Nest protects?

Thanks!

Posts: 1

Participants: 1

Read full topic

Automation not triggering fast enough?

$
0
0

@jimjones41465 wrote:

I’m relatively new to home assistant and have a question about an automation I set up.

I wired a mechanical switch to a z-wave door sensor and attached it to my mailbox door so that I can get notifications when the mail is delivered. Everything works great, except that when the door is open and closed quickly, sometimes the automation I set up to notify me doesn’t work. Home assistant still records that the door was opened, but I set up a notification to send a text message to my phone, and this doesn’t seem to trigger.

My automation code is:

- id: '1585251647546'
  alias: Mailbox Door Open
  description: ''
  trigger:
  - entity_id: binary_sensor.mailboxdoor
    to: 'on'
    platform: state
  condition: []
  action:
  - data:
      message: Mailbox Door Open
      title: Mailbox Door Open
    service: notify.mailboxnotify

The home assistant card shows a very thin green sliver where the door was opened, so it is recorded as open for like 1-2 seconds, but the automation doesn’t trigger.

Clipboard01

Anyone have any ideas how to make this more reliable?

Thanks!

Posts: 2

Participants: 2

Read full topic

How to add 3 days to now()

$
0
0

@Xa4.Jens wrote:

I am using an equation to activate a template sensor for a waste notification. The waste is collected on Thursday, so the switch can be switched on Friday. With the current formula, this only happens on Sunday. How can I add 3 days to now () so that the new week begins at friday?

> # switch restafval
>   - platform: template
>     sensors:
>       restafval:
>         friendly_name: "Restafval"          
>         value_template: '{{ ((now().strftime("%U") | int) / 4)-0.25 == (((now().strftime("%U") | int) / 4)-0.25) | round(0) }}'
>         icon_template: mdi:trash-can 
>  
> # switch GFT
>   - platform: template
>     sensors:
>       gft:
>         friendly_name: "GFT"          
>         value_template: '{{ ((now().strftime("%U") | int) / 2) == ((now().strftime("%U") | int) / 2) | round(0) }}'
>         icon_template: mdi:apple
>           
> # switch Plastic
>   - platform: template
>     sensors:
>       plastic:
>         entity_id: sensor.date
>         friendly_name: "Plastic"
>         value_template: '{{ ((now().strftime("%U") | int) / 4)-0.75 == (((now().strftime("%U") | int) / 4)-0.75) | round(0) }}'
>         icon_template: mdi:bottle-wine´

Posts: 2

Participants: 2

Read full topic

How to say in message which windows are open?

$
0
0

@Argo wrote:

Hello! I am a little bit struggling with script which would check if any window is open and if it is - send me a message with friendly name of the entity (or names if there are several open windows)

So, here is the basic part of the script:

'1536739215145':
  alias: Check if windows are open while leaving
  sequence:
  - condition: state
    entity_id: binary_sensor.door_window_sensor_158d0002bfc936
    state: 'off'

And now I need to check my group.all_windows and find out which ones are open

May I get help on that?

Posts: 2

Participants: 2

Read full topic

Ptvo.info New Firmware

$
0
0

@LRRuk wrote:

After some advice from knowledgeable people.

Background;

I’ve gone from Hue bridge and 3 of Xiaomi Hubs to a Zigbee2mqtt setup with a cc2531 and 4 of cc2530+cc2591 routers however these kept dropping nodes… So I went back to the Hue + Xiaomi setup.

This was working great until recently when the Hue bridge kept dropping lights, so I took the plunge and got a ‘Conbee II’ stick with a Raspberry Pi 4B which after a number of teething problems is now rock solid for the majority of my set up.

Problem

I need to improve far reaches of the house and thought I’d re-use the four cc2530+cc2591 routers. Flashing the latest ‘Koenkk/Z-Stack-firmware’ doesn’t seem to be too reliable, so I’ve been looking around (a lot being on lockdown) and come across ‘ptvo.info’ who has released a number of sets of firmware for the cc2530 including a release in the last few days.

Question

Does anyone have any experience with or know of any problems working with this firmware between HA and DeCONZ? On initial setup it appears to work better and as a plus point had the option to configure a status LED which put an end to starring at a beige box thinking “Is it on? Is it working?”.

Grateful for your time and knowledge.

Posts: 1

Participants: 1

Read full topic

Viewing all 105555 articles
Browse latest View live


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