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

Changing scanning interval of OpenGarage integration

$
0
0

Hey everyone,

Pretty much as the title states. I have the OpenGarage integration setup. Previously it was in the configuration.yaml but now it is integrated into the GUI integration.

I have issues where I have an automation that turns lights on when the garage door opens (or rather is identified as open after dark) but the pollig rate is slow enough that I can open the garage door, drive in and close the door before the system polls again. This basically has the effect that the door was never “open”.

Now I know you can modify the scanning_interval within the config.yaml file when you used to add the integration but how do you do that now?

Thank you.

1 post - 1 participant

Read full topic


Can cameras be added to homekit through home assistant?

$
0
0

Hello! I installed homeassistant, HACS and Unifi Protect. Everything works good and I can see the cameras in the dashboard. I also have the homekit connected and even if I included the cameras in the domains, they do not appear in homekit. Am I missing something? Can Unifi cameras work with homekit through homeassistant?

1 post - 1 participant

Read full topic

Weather notification when the state changes from one populated value to another

$
0
0

Hi Everyone.

I have an automation

alias: NOTIFY_Weather Statement
description: Sends a notice when the weather sensor changes from null to populated
trigger:
  - platform: template
    value_template: >-
      {% if states('sensor.weather_location_1_warnings') != "" %}True{%
      endif %}
condition: []
action:
  - service: notify.mobile_app_phone1
    data:
      title: Weather Alert!
      message: >-
        There is a weather alert presently. Be advised of
        {{states('sensor.weather_location_1_warnings')}}.
      data:
        tag: weather_alert
  - service: notify.mobile_app_phone2
    data:
      title: Weather Alert!
      message: >-
        There is a weather alert presently. Be advised of
        {{states('sensor.weather_location_1_warnings')}}.
      data:
        tag: weather_alert
mode: single

Now essentially when the sensor has no warning or weather statement it’s null. And this (I’m not sure if it even works yet as I only made it today :stuck_out_tongue: but the state in the developer tab seems to work). But this would only fire when it changes from null to something.
How would I have it fire when it changes from one warning to another?

For example from snow storm warning to blizzard warning.
Note that these are warnings from the “Environment Canada” weather integration.

Thank you.

1 post - 1 participant

Read full topic

Google calendars - wrong time format

$
0
0

Hello.
Not sure if all HA components should follow the same rules, especially in order to maintain compatibility between each other.
Anyway recently I found in logs (v2021.12.9), timestamp sensor started to fail when receiving time copied directly from google calendar sensor.

The error is:

ValueError: Invalid datetime: sensor.waste_mixed provides state '2022-01-21 00:00:00', which is missing timezone information

And in fact this is how google data taken from google calendar looks like:

I can see 2 obvious things missing from data stored in google calendar entity attributes:

  1. The date is not ISO formatted (missing T character between date and time parts). This missing is here for long time. Actually I was adding this T in order to be able to use that value in the sensor.
  2. There is no timezone information. At this point I don’t know google API provides it, but I would be really surprised if not.

I didn’t find settings in google calendar integration page which allows to change those data.
Can you confirm I’m not missing anything and thus i should raise an issue to github?

TBH I’m not aware about breaking change released recently, making timestamp sensor fail unless timezone provided. I can see changes in templating, but I set the sensor using nodered, not using templates (unless NR uses templates to do so)

2 posts - 2 participants

Read full topic

Change switch icon

$
0
0

Hi, I have a problem changing my entity´s icon. As you see in the picture is the green one correct so I want to change the flashes to a switch like the green one. So it´s not the bulb it’s only the flashes. Thanks in advance.

Cheers

1 post - 1 participant

Read full topic

How to read router measurements (upnp) from different subnet?

$
0
0

Hello

I used to have a cable modem next to my home assistant installation in the same subnet but now I had to move all the IOT stuff behind another wireless router along with home assistant installation. At the same time, I lost all the cable modem measurements (via upnp).

I checked that I’m able to reach cable modem upnp port from the laptop in which I have installed home assistant as a container. I did that checking by using Nmap and I wonder should home assistant discover that old modem somehow or should I do some manual stuff over there? The only difference is that now home assistant and old router are in the different subnets but the upnp port is still reachable (routed) between them.

Upnp discovery works somehow since my home assistant installation is able to read the new router measurements. The new router is connected to old one and I just move all the IOT stuff behind it.

Any ideas what I could try to do? And thanks in advance:-)

1 post - 1 participant

Read full topic

How to turn off Home Assistant correctly?

$
0
0

Hello,
In server controls, the shutdown button has disappeared. How to turn off Home Assistant correctly? Thanks a lot!

1 post - 1 participant

Read full topic

MQTT Roomba set Autodiscovery

$
0
0

Hello to everyone.
Did someone could help me to create a topic for autodiscovery my roomba device?

I have this state topic

state_topic: "roomba/state"
This is the payload
{
    "state": "docked",
    "battery_level": 59
}

and this config in my yaml

vacuum:
- platform: mqtt
  name: Roomba
  schema: state
  command_topic: "roomba/commands"
  retain: true
  state_topic: "roomba/state"
  supported_features:
    - start
    - stop
    - return_home
    - battery

Thanks a lot for everyone
Best Regards
Stefano

1 post - 1 participant

Read full topic


How to make a dump notification smart? (add state of a sensor to the notification)

$
0
0

I use add-on room-assistant to track locations of our mobile phones. This works fine, so In HA I can see where each phone is located (living, kitchen, bedroom etc).

In HA I created an automation to send me a notification every time my tracked device is changing its position. In this automation I use the action “notify.mobile_app_oneplus9pro” to actually send this notification to my phone.

I now have for example below notification, which works but is rather a dump notification:

service: notify.mobile_app_oneplus9pro
data:
  message: BT tracking - living

I want to make this notification smarter by adding the actual location to it.
I now struggle how to get this added to the automation.

I was thinking of this:

service: notify.mobile_app_oneplus9pro
data:
  data: {}
  message: >-
    service: notify.mobile_app_oneplus9pro   
    data:     
      message: >- 
      Your OnePlus is detected at: 
      {% if is_state('sensor.oneplus_9_pro_room_presence', 'firstfloor') %} firstfloor
      {% elif is_state('sensor.oneplus_9_pro_room_presence','living') %} living       
      {% elif is_state('sensor.oneplus_9_pro_room_presence', 'bedroom') %} bedroom
      {% elif is_state('sensor.oneplus_9_pro_room_presence', 'kitchen') %}kitchen 
      {% elif is_state('sensor.oneplus_9_pro_room_presence','HomeServer') %} HomeServer 
      {% elif is_state('sensor.oneplus_9_pro_room_presence', 'not_home') %} not_home
      {%elif is_state('sensor.oneplus_9_pro_room_presence', 'Unavailable') %} Unavailable 
      {%endif %}

Every time I try to save the automation, a grey bar moves in my screen indicating that I have an error at “data”. So I can’t save the automation. What am I doing wrong here?

Thanks!

2 posts - 2 participants

Read full topic

Trigger based on specific iOS notification

$
0
0

Is it possible to trigger home assistant based on a specific iOS notification?

Ie notification comes in that says “house on fire” or from a specific app and that triggers something? I’d imagine most likely via the iPhone shortcuts app first then a webhook but I’m not sure at all

My use case:

Got a a cheap Tuya flood sensor
I don’t want to faff with a developer account etc to integrate with HA atm until local access is setup.
Notification from the Smart Life pops up saying “flood detected”
I’d like home assistant to alert me/perform some actions

1 post - 1 participant

Read full topic

Frustrating: my person entity simply gone

$
0
0

Hi,

Very strange thing is going on on my HA right now. When im trying to set a new automation and add a condition based on zone I cant find my person entity in the options list, not only that I can’t find my person entity, I actually can’t find any entity at all. What the hell is going on here?

The text in this screenshot is in Hebrew because I’m from Israel, but I believe you can guess what is written there

1 post - 1 participant

Read full topic

Need help with configuration.yaml for media player

$
0
0

Hello everyone,

I have a problem with a switch that i’d like to get some help with. I have set up a switch template for controlling the input and volume of a audio receiver that has network control. The configuration.yaml looks as follows:

switch 1:
        - platform: template
          switches:
                  marantz_audioaux:
                          value_template: >
                                  {{ is_state_attr('media_player.tv_stue', 'source', 'AUX:Analog In') }}
                          turn_on:
                                  service: media_player.select_source
                                  data_template:
                                          entity_id: media_player.tv_stue
                                          source: 'AUX:Analog In'
                                  service: media_player.volume_set
                                  data:
                                          entity_id: media_player.tv_stue
                                          volume_level: 0.25
                          turn_off:
                                  service: media_player.select_source
                                  data_template:
                                          entity_id: media_player.tv_stue
                                          source: 'AUX:Analog In'
                                  service: media_player.volume_set
                                  data:
                                          entity_id: media_player.tv_stue
                                          volume_level: 0.25

The problem is that using this switch I get the following error:
marantz_audioaux: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data[‘source’]

Can anyone help me out?

Best regards,
Anders

1 post - 1 participant

Read full topic

Lsc smart conect smart wifi dimmerswitch (tuya ) cant conect to tuya app -need help/or/cheap diy wifi alternative

$
0
0

i ve bought a cheap 9 euro wifi dimmer switch (that doesnt need to be wired into the wall )

im trying to add it to the tuya app but i cant seem to add it .witch kinda sucks because i really need something like this. Because i cant build things into my wall due to me renting my place (also I’m not a electrician)

i was wondering if someone has manged to add it to the tuya app/homeassistent -or could recommend a wireless diy/ esp32 /arduino solution. im not aposed to using diy electronics using a eps32 . as long its is not to difficult to follow

1 post - 1 participant

Read full topic

Energy Dashboard shows negative grid and solar values when monitor device reset

$
0
0

Hi

I am reporting every minute energy values via MQTT from my custom monitor device to HomeAssistant. Every minute the monitoring device reports Total Consumed, Total Solar, Total grid - in watts, for that minute.

All was working fine and energy dashboard displayed the correct units, amounts, etc… until I had to reset the monitoring device to change the code. When the device was reset, the bars in the energy dashboard jumped to negative thus:

I am rather new to HA so any pointers would be appreciated!

P

1 post - 1 participant

Read full topic

Mqtt_room: 2 devices (with same device_id) in 2 different rooms?

$
0
0

What is the expected behavior when an entity is in multiple “rooms” at the same time?

I can imagine two scenario’s:

  • two rooms that overlap (e.g. living room and kitchen)
    • → shortest distance “wins”? Would be fine.
  • devices with identical ID (e.g. ESPresense can have non-unique fingerprint for multiple devices, e.g. an iPhone 12 Pro shows up as espresense/devices/apple:iphone13-3 ), two different devices can be in two different rooms
    • → would like to see these two devices appear in both rooms

I see MQTT messages for both rooms, but the HA entity (of course) shows a single status.
Would be helpful if the entity had an attribute that contains an array of all rooms, e.g. attribute rooms: ['living room', 'office'].

1 post - 1 participant

Read full topic


Unable to read electtrical current on a Thermia calibra heatpump using modbus

$
0
0

I’m trying to access the current of my Thermia Calibra heatpump using modbus.
I’m able to access some parameters like outside temperature, compressor speed, indoor temperature and so on with the following code:

modbus:
  - type: tcp
    name: Thermia
    host: 192.168.0.175
    port: 502
    sensors:
      - name: wp_outside_temp
        unit_of_measurement: °C
        address: 13
        input_type: input
        scan_interval: 300
        data_type: int16
        scale: 0.1
      - name: wp_compressor_speed_%
        unit_of_measurement: "%"
        address: 54
        input_type: input
        scan_interval: 300
        data_type: int16
        scale: 0.01
      - name: wp_room_temperature_sensor
        unit_of_measurement: °C
        address: 121
        input_type: input
        scan_interval: 300
        data_type: int16
        scale: 1

However when I try to access the current I just get a value zero.

The code I’m trying is the following:

    sensors:
      - name: current_phase_1
        unit_of_measurement: A
        address: 68
        input_type: input
        scan_interval: 300
        data_type: int16
        scale: 0.1

Using the following python code I also get a 0.

result =  client.read_input_registers(78, 3)
for register in result.registers:
    print(f'{register}')

Any modbus experts here?
Do I need an extra addon to measure current?

Thanks in advance.

The modbus documentation can be found at the following link:

1 post - 1 participant

Read full topic

Passing variables to a script from an automation

$
0
0

Hey folks, thanks in advance for your help. :pray:t2::beer:

I’ve read through the script syntax here, but I can’t see where I’m going wrong.

I’m trying to send a notification that will appear on my TV.
To do it, I’m using most of this script … this bit works great.
I see the notification on the TV without a problem.

# ===============================================================
# Send a Notification to the Lounge TV
# ===============================================================
 
 notification_to_lounge_tv:
   alias: "Send a Notification to the Lounge TV"
   mode: restart
   sequence:

    - choose:
        - conditions:
            - condition: state
              entity_id: media_player.lounge_tv
              state: "on"
          sequence:
            - service: notify.lounge_tv
              data:
                message: "This is a test message"
                title: "TITLE"

However, what I really want to do is pass the message to it as a variable when its called from an automation. So in this case, I’m using this script which is almost the same …

# ===============================================================
# Send a Notification to the Lounge TV
# ===============================================================
 
 notification_to_lounge_tv:
   alias: "Send a Notification to the Lounge TV"
   mode: restart
   sequence:

    - choose:
        - conditions:
            - condition: state
              entity_id: media_player.lounge_tv
              state: "on"
          sequence:
            - service: notify.lounge_tv
              data:
                message: "{{ message }}"
                title: "{{ title }}"

and for the automation …

# ===============================================================
# Person detected in the Front Garden
# ===============================================================

- id: '5C43859D-5396-41E2-A93D-71F1020FD0BF'
  mode: single
  alias: "Person detected"

  trigger:
  - platform: state
    entity_id: sensor.front_garden_camera_detected_object
    to: person

  action:
  - service: script.notification_to_lounge_tv
    data: 
      variables:
        title: "TITLE"
        message: "Person Detected"
  - service: notify.mobile_app_iphone
    data:
      message: "Person Detected"

In this case, I get the notification on the iPhone, so I know the automation is firing, but I’m not getting the notification on the TV.

Clearly I’m missing a trick, but I just can’t see it. There are no errors in my logs.

Thanks in advance!

3 posts - 2 participants

Read full topic

Script to turn switch on and have light at a specific brightness

$
0
0

Hey guys, I’m fairly new to Home Assistant from another home automation platform. I’ve got a somewhat mixed bag of hardware (Zigbee, Z-Wave, Insteon, WiFi) but have got it all configured and working in Home Assistant and a few simple automations for things up and running.

I’m trying to create a script that turns an Insteon light switch on and then sets the Zigbee (Philips Hue) bulb to a specific brightness. I’m not using the Philips Hue hub, but am directly connecting to the bulbs via my Zigbee hub in Home Assistant.

I’m wanting to use a script so that I can call it from various automations. Once I’ve got one instance working I can copy and modify the script for other similar situations (Z-Wave, Zigbee switches, etc).

I’ve been trying to create a script(s) and have had varying results. I’m not really getting what I want to happen.

I’d really appreciate it if someone could show me an example that would work with my Insteon switch and Zigbee bulb? Thanks.

1 post - 1 participant

Read full topic

Particle photon integration via particle cloud or MQTT?

$
0
0

Hi

I have a particle photon with a DHT22 sensor to read temperature and pressure. I would like to integrate it with home assistant, just to display the data there. What is the best way to do it?

I have read that it can be done via MQTT, but also the photon can publish json messages to particle cloud or any other endpoint.

What is the best way to do this integration? Has anybody done that before?

Thanks

1 post - 1 participant

Read full topic

Include sensors

$
0
0

Hello everybody,

I hope that someone can help/explain to me what I’m doing wrong or don’t understand.
I have been playing around with Home Assistant for the last month of two. Installed a dashboard (dwains dashboard) with multiple sensor files, and theya are working. I have followed all the installation / configuration steps of each add-on. But I run into this “thing” that I don’t understand.

All my sensor files are located in a folder called sensors. What I have added in my configuraiton.yaml file are the following include:

group: !include groups.yaml
light: !include lights.yaml
switch: !include switch.yaml
utility_meter: !include utility_meter/utility.yaml
sensor: !include_dir_merge_list sensors/
binary_sensor: !include_dir_merge_list binary/

The one thing that I don’t understand is why certain senor files are not being “loaded”? I can’t find the sensors/entities in the Development tools. But if I add them directly in the configuration.yaml file all the entities/sensors are being created and are searchable in the Developments tools.

Below one example of one sensor file that is not being loaded/created (i have removed some of the information that is related to my own network). I hope that someone can explain to me what is wrong. As the log files of home assistant don’t show any warnings/errors.


# SNMP sensors
# if you have more ap/switches you can copy paste the code.
# change name and ip and you are ready to go
#
sensor:
  - platform: snmp
    host: xxx.xxx.xxx.xxx
    name: Unifi Switch Uptime
    baseoid: 1.3.6.1.2.1.1.3.0
    value_template: >
      {%- set time = value | int // 100 %}
      {%- set minutes = ((time % 3600) // 60) %}
      {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
      {%- set hours = ((time % 86400) // 3600) %}
      {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
      {%- set days = (time // 86400) %}
      {%- set days = '{}d '.format(days) if days > 0 else '' %}
      {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}

  - platform: snmp
    host: xxx.xxx.xxx.xxx
    name: Unifi Switch Firmware Version
    baseoid: 1.3.6.1.4.1.4413.1.1.1.1.1.13.0

  - platform: snmp
    host: xxx.xxx.xxx.xxx
    name: Unifi Switch Model
    baseoid: 1.3.6.1.4.1.4413.1.1.1.1.1.2.0

  - platform: snmp
    host: xxx.xxx.xxx.xxx
    name: Unifi AP Uptime
    baseoid: 1.3.6.1.2.1.1.3.0
    value_template: >
      {%- set time = value | int // 100 %}
      {%- set minutes = ((time % 3600) // 60) %}
      {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
      {%- set hours = ((time % 86400) // 3600) %}
      {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
      {%- set days = (time // 86400) %}
      {%- set days = '{}d '.format(days) if days > 0 else '' %}
      {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}

  - platform: snmp
    host: xxx.xxx.xxx.xxx
    name: Unifi AP Model
    baseoid: 1.3.6.1.4.1.41112.1.6.3.3.0

  - platform: snmp
    host: xxx.xxx.xxx.xxx
    name: Unifi AP Firmware Version
    baseoid: 1.3.6.1.4.1.41112.1.6.3.6.0

## Template sensors

  - platform: template
    sensors:
      unifi_gateway_wan_cpu:
        friendly_name: "CPU"
        unit_of_measurement: "%"
        value_template: "{{ states.sensor.unifi_gateway_wan.attributes['gw_system-stats']['cpu'] }}"
      unifi_gateway_wan_mem:
        friendly_name: "Memory"
        unit_of_measurement: "%"
        value_template: "{{ states.sensor.unifi_gateway_wan.attributes['gw_system-stats']['mem'] }}"
      unifi_gateway_wan_ip:
        friendly_name: 'WAN IP'
        value_template: '{{ states.sensor.unifi_gateway_wan.attributes.wan_ip }}'
        entity_id: sensor.unifi_gateway_wan
      unifi_gateway_wan_download:
        friendly_name: 'WAN Download'
        unit_of_measurement: Kbps
        icon_template: "mdi:progress-download"
        value_template: "{{ (states.sensor.unifi_gateway_wan.attributes['rx_bytes-r'] / 1024) | int }}"
      unifi_gateway_wan_uptime:
        friendly_name: "USG Uptime"
        value_template: >
          {%- set time = states.sensor.unifi_gateway_wan.attributes['gw_system-stats']['uptime'] | int %}
          {%- set minutes = ((time % 3600) // 60) %}
          {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
          {%- set hours = ((time % 86400) // 3600) %}
          {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
          {%- set days = (time // 86400) %}
          {%- set days = '{}d '.format(days) if days > 0 else '' %}
          {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
      unifi_gateway_firmware_version:
        friendly_name: "USG Firmware Version"
        icon_template: "mdi:database-plus"
        value_template: "{{ states.sensor.unifi_gateway_wan.attributes.gw_version }}"
      unifi_gateway_www_xput_down:
        friendly_name: "USG Speedtest Download"
        unit_of_measurement: Mbps
        icon_template: "mdi:progress-download"
        value_template: "{{ states.sensor.unifi_gateway_www.attributes.xput_down }}"
      unifi_gateway_www_xput_up:
        friendly_name: "USG Speedtest Upload"
        unit_of_measurement: Mbps
        icon_template: "mdi:progress-upload"
        value_template: "{{ states.sensor.unifi_gateway_www.attributes.xput_up }}"
      unifi_gateway_www_speedtest_ping:
        friendly_name: "USG Speedtest Ping"
        unit_of_measurement: ms
        icon_template: "mdi:progress-clock"
        value_template: "{{ states.sensor.unifi_gateway_www.attributes.speedtest_ping }}"
      unifi_gateway_www_uptime:
        friendly_name: 'Internet Uptime'
        value_template: >
          {%- set time = states.sensor.unifi_gateway_www.attributes.uptime | int %}
          {%- set minutes = ((time % 3600) // 60) %}
          {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
          {%- set hours = ((time % 86400) // 3600) %}
          {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
          {%- set days = (time // 86400) %}
          {%- set days = '{}d '.format(days) if days > 0 else '' %}
          {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
      unifi_gateway_wlan_num_user:
        friendly_name: 'Users'
        icon_template: "mdi:account-multiple"
        value_template: '{{ states.sensor.unifi_gateway_wlan.attributes.num_user }}'
      unifi_gateway_lan_num_user:
        friendly_name: 'Users Lan'
        icon_template: "mdi:account-multiple"
        value_template: '{{ states.sensor.unifi_gateway_lan.attributes.num_user }}'
      unifi_ssid_wifi_users:
        friendly_name: "Wi-Fi ssid"
        value_template: "{{ states.sensor.unifi.attributes['Wi-Fi'] }}"
      unifi_ssid_not_users:
        friendly_name: "NoT ssid"
        value_template: "{{ states.sensor.unifi.attributes['NoT'] }}"
      unifi_wired_users:
        friendly_name: "wired devices"
        value_template: "{{ states.sensor.unifi.attributes['wired'] }}"


1 post - 1 participant

Read full topic

Viewing all 106083 articles
Browse latest View live


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