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

Write automation listening to knx group address to control shutters (cover)

$
0
0

I wrote an automation (script) to control two shutters by a knx group adress signal
if rolladen_straße.close() command is set (from knx or homassistant ui)
rolladen_straße_T.close() (first shutter) shout be executed, then after 1s
rolladen_straße_N.close() (second shutter should be executed

the script itself works, but not the “trigger”

this is the script:

id: '1642348490881'
  alias: Rolladen Straße (close)
  description: ''
  trigger:
  - platform: state
    entity_id: cover.rolladen_strasse
    to: close
  condition: []
  action:
  - service: cover.close_cover
    target:
      entity_id: cover.rolladen_strasse_t
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: cover.close_cover
    target:
      entity_id: cover.rolladen_strasse_n
  mode: single
- id: '1642348599922'

Who can help?

6 posts - 3 participants

Read full topic


Samsung Family Hub SmartThings door status not updating

$
0
0

Hi,
I habe a Samsung Family hub fridge that I connected via the SmartThings integration.

I added some automations to notify me when the fridge is open for >2min. Quite often notifications are triggered even the door is already closed. An then it still shows status as open in the dash.

Opening and closing mostly resolves the issue. It seems that sometimes but not always something gets lost along the way because the fridge itself sees the door as closed (otherwise the internal alarm of the fridge would sound). So it’s not a hardware issue of the fridge itself.

1 post - 1 participant

Read full topic

Custom icons: Standardizing, displaying static/running, etc (looking for options)

$
0
0

Hi all. I’m looking to standardize my icon sets across the board early in my setup to avoid looking like I have some cobbled-together mess. I’ve been gathering png icons for button cards to start, but I’m struggling to find consistency. Does anyone have any suggestions of where I might look?

I’ve browsed some of the custom configurations people have posted, and I’ve found some icons I like, but there doesn’t seem to be a single resource that offers a consistent style for home automation.

I have this below set for lightbulbs, grow tent lights, etc, which I really like:

As another example, I’d love to find something where I could add a static fan image for “off”, and an animated version when the fan is on, like below:

Again, I’m looking for static and animated icons based on state that are similar to this. Any suggestions are greatly appreciated!

1 post - 1 participant

Read full topic

How integrate rest_command in Google Home

$
0
0

Hello,

I have a lot of switches defined like this :

switch:
  - platform: command_line
    switches:
        spots_hallway:
          command_on: curl "http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=5&CHA=0&EVT=3"
          command_off: curl "http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=5&CHA=1&EVT=3"
          friendly_name: "Lichten gang"

These works fine and are showing up in Google Home.

But I also have these rest_commands (f.e. my shutters) :

rest_command:
  rolluik_eettafel_op_kort:
    url: http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=2&CHA=10&EVT=3
  rolluik_eettafel_op_lang:
    url: http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=2&CHA=10&EVT=4
  rolluik_eettafel_neer_kort:
    url: http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=1&CHA=10&EVT=3

How can I make these visible in Google Home and how can I give them a friendly name (to use with Google Assistant) ?

I have this in my configuration.yaml :

google_assistant:
  project_id: home-assistant-xxxxx
  service_account: !include SERVICE_ACCOUNT.json
  report_state: true
  exposed_domains:
    - switch
    - light
    - camera
    - scene
    - sensor
    - script
    - **rest_command**
  entity_config:
    switch.tv_samsung_6_series_50:
      expose: false

1 post - 1 participant

Read full topic

ZIgbee device unavailable in HA Overview but fully working in Zigbee2mqtt

$
0
0

Hi everyone,

I have a window Schneider Electrics shutter controller connected to my Home Assistant with Zigbee. The device works fine under the Zigbee2mqtt tab, where it appears online and I can operate it from the Zigbee2mqtt dashboard. However, in the Home Assistant Overview it always appears as unavailable.

I verified availability is set to true both in the zigbee2mqtt configuration.yaml and device.yaml
I am using zigbee2mqtt 1.22.2-1 with Home Assistant core-2021.12.9 on a Raspberry Pi

Is there some other point I am missing to make it available in the HA Overview?

Thanks

1 post - 1 participant

Read full topic

Issue with conditional automation - Condition not working as expected

$
0
0

Hi,
I’m setting up an automation to ensure my thermostat turns of when both myself and partner are out of home. Hence I use the zone for each of the defined persons as triggers, followed by a choose that assesses the current states.

alias: 'Environment - Turn off thermostat when away '
description: ''
trigger:
  - platform: state
    entity_id: person.me
    to: null
  - platform: state
    entity_id: person.partner
    to: null
condition: []
action:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: not
                conditions:
                  - condition: zone
                    entity_id: person.me
                    zone: zone.home
              - condition: not
                conditions:
                  - condition: zone
                    entity_id: person.partner
                    zone: zone.home
        sequence:
          - device_id: 180eb38900273f74617503ed50b01d89
            domain: climate
            entity_id: climate.smartthermostat
            type: set_hvac_mode
            hvac_mode: 'off'
      - conditions:
          - condition: device
            device_id: 180eb38900273f74617503ed50b01d89
            domain: climate
            entity_id: climate.smartthermostat
            type: is_hvac_mode
            hvac_mode: 'off'
        sequence:
          - device_id: 180eb38900273f74617503ed50b01d89
            domain: climate
            entity_id: climate.smartthermostat
            type: set_hvac_mode
            hvac_mode: auto
    default: []
mode: single

However some debug traces and up in the default rather than to execute the action.

Last example:
I’m leaving home, while my partner was already away.

Hence I would expect my condition to trigger, as now both persons are not_home. However it ended up in the default.

Debug trace:

{
  "trace": {
    "last_step": "action/0/choose/1/conditions/0",
    "run_id": "7fdf4694a473902518a687d22bde659f",
    "state": "stopped",
    "script_execution": "finished",
    "timestamp": {
      "start": "2022-01-16T17:25:02.007482+00:00",
      "finish": "2022-01-16T17:25:02.041887+00:00"
    },
    "domain": "automation",
    "item_id": "1635889248367",
    "trigger": "state of person.me",
    "trace": {
      "trigger/0": [
        {
          "path": "trigger/0",
          "timestamp": "2022-01-16T17:25:02.007600+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.environment_turn_off_thermostat_when_away",
              "state": "on",
              "attributes": {
                "last_triggered": "2022-01-16T02:46:06.127489+00:00",
                "mode": "single",
                "current": 0,
                "id": "1635889248367",
                "friendly_name": "Environment - Turn off thermostat when away "
              },
              "last_changed": "2022-01-13T16:45:26.117708+00:00",
              "last_updated": "2022-01-16T02:46:06.141476+00:00",
              "context": {
                "id": "4b870e6f00f2251e5062cefa6e4c2d09",
                "parent_id": "2fa0c3afa7759ae371fd98a6fe7dc738",
                "user_id": null
              }
            },
            "trigger": {
              "id": "0",
              "idx": "0",
              "platform": "state",
              "entity_id": "person.me",
              "from_state": {
                "entity_id": "person.me",
                "state": "home",
                "attributes": {
                  "editable": false,
                  "id": "me",
                  "latitude": <lat>,
                  "longitude": <long>,
                  "gps_accuracy": 60,
                  "source": "device_tracker.oneplus_8_pro",
                  "user_id": "e8f27a6f86424260a0a5c99eacad2714",
                  "friendly_name": "Thibault"
                },
                "last_changed": "2022-01-16T02:46:06.121219+00:00",
                "last_updated": "2022-01-16T17:24:04.620457+00:00",
                "context": {
                  "id": "1dd58049d6216a33b86b1c3301f7f227",
                  "parent_id": null,
                  "user_id": null
                }
              },
              "to_state": {
                "entity_id": "person.me",
                "state": "not_home",
                "attributes": {
                  "editable": false,
                  "id": "me",
                  "latitude": <lat>,
                  "longitude": <long>,
                  "gps_accuracy": 10,
                  "source": "device_tracker.oneplus_8_pro",
                  "user_id": "e8f27a6f86424260a0a5c99eacad2714",
                  "friendly_name": "Thibault"
                },
                "last_changed": "2022-01-16T17:25:01.999095+00:00",
                "last_updated": "2022-01-16T17:25:01.999095+00:00",
                "context": {
                  "id": "8a4f452ecacef44dfa59678ebc0dce51",
                  "parent_id": null,
                  "user_id": null
                }
              },
              "for": null,
              "attribute": null,
              "description": "state of person.me"
            }
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2022-01-16T17:25:02.016142+00:00",
          "changed_variables": {
            "context": {
              "id": "8a53e50b727013832d0aac49c8b8e626",
              "parent_id": "8a4f452ecacef44dfa59678ebc0dce51",
              "user_id": null
            }
          },
          "result": {
            "choice": "default"
          }
        }
      ],
      "action/0/choose/0": [
        {
          "path": "action/0/choose/0",
          "timestamp": "2022-01-16T17:25:02.016378+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/0/conditions/0": [
        {
          "path": "action/0/choose/0/conditions/0",
          "timestamp": "2022-01-16T17:25:02.016594+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/0/conditions/0/conditions/0": [
        {
          "path": "action/0/choose/0/conditions/0/conditions/0",
          "timestamp": "2022-01-16T17:25:02.016725+00:00",
          "result": {
            "result": true
          }
        }
      ],
      "action/0/choose/0/conditions/0/conditions/0/conditions/0": [
        {
          "path": "action/0/choose/0/conditions/0/conditions/0/conditions/0",
          "timestamp": "2022-01-16T17:25:02.016854+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/0/conditions/0/conditions/1": [
        {
          "path": "action/0/choose/0/conditions/0/conditions/1",
          "timestamp": "2022-01-16T17:25:02.017302+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/0/conditions/0/conditions/1/conditions/0": [
        {
          "path": "action/0/choose/0/conditions/0/conditions/1/conditions/0",
          "timestamp": "2022-01-16T17:25:02.017431+00:00",
          "result": {
            "result": true
          }
        }
      ],
      "action/0/choose/1": [
        {
          "path": "action/0/choose/1",
          "timestamp": "2022-01-16T17:25:02.017915+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/1/conditions/0": [
        {
          "path": "action/0/choose/1/conditions/0",
          "timestamp": "2022-01-16T17:25:02.018058+00:00",
          "result": {
            "result": false
          }
        }
      ]
    },
    "config": {
      "id": "1635889248367",
      "alias": "Environment - Turn off thermostat when away ",
      "description": "",
      "trigger": [
        {
          "platform": "state",
          "entity_id": "person.me",
          "to": null
        },
        {
          "platform": "state",
          "entity_id": "person.partner",
          "to": null
        }
      ],
      "condition": [],
      "action": [
        {
          "choose": [
            {
              "conditions": [
                {
                  "condition": "and",
                  "conditions": [
                    {
                      "condition": "not",
                      "conditions": [
                        {
                          "condition": "zone",
                          "entity_id": "person.me",
                          "zone": "zone.home"
                        }
                      ]
                    },
                    {
                      "condition": "not",
                      "conditions": [
                        {
                          "condition": "zone",
                          "entity_id": "person.partner",
                          "zone": "zone.home"
                        }
                      ]
                    }
                  ]
                }
              ],
              "sequence": [
                {
                  "device_id": "180eb38900273f74617503ed50b01d89",
                  "domain": "climate",
                  "entity_id": "climate.smartthermostat",
                  "type": "set_hvac_mode",
                  "hvac_mode": "off"
                }
              ]
            },
            {
              "conditions": [
                {
                  "condition": "device",
                  "device_id": "180eb38900273f74617503ed50b01d89",
                  "domain": "climate",
                  "entity_id": "climate.smartthermostat",
                  "type": "is_hvac_mode",
                  "hvac_mode": "off"
                }
              ],
              "sequence": [
                {
                  "device_id": "180eb38900273f74617503ed50b01d89",
                  "domain": "climate",
                  "entity_id": "climate.smartthermostat",
                  "type": "set_hvac_mode",
                  "hvac_mode": "auto"
                }
              ]
            }
          ],
          "default": []
        }
      ],
      "mode": "single",
      "trace": {
        "stored_traces": 20
      }
    },
    "blueprint_inputs": null,
    "context": {
      "id": "8a53e50b727013832d0aac49c8b8e626",
      "parent_id": "8a4f452ecacef44dfa59678ebc0dce51",
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "Environment - Turn off thermostat when away ",
      "message": "has been triggered by state of person.me",
      "source": "state of person.me",
      "entity_id": "automation.environment_turn_off_thermostat_when_away",
      "context_id": "8a53e50b727013832d0aac49c8b8e626",
      "when": "2022-01-16T17:25:02.007862+00:00",
      "domain": "automation"
    }
  ]
}

Any idea why the condition didn’t execute ?

1 post - 1 participant

Read full topic

Error when installing hass-variables

$
0
0

Hello, I’m trying to install hass-variables (GitHub - rogro82/hass-variables: Home Assistant variables component)
The issue is that the HA config does not accept type: integration in lines:

In HACS settings, add a custom repository with:

  • URL: https://github.com/rogro82/hass-variables
  • type: integration

It only accept types css, html, js, module.

I guess the plugin is old, and maybe there’s a better solution ?

Kind regards

2 posts - 2 participants

Read full topic

Dashboard RAW config file clause statement

$
0
0

Hi,

is it possible to have conditional statement in Dashboard RAW config file?

Idea is to have dynamic background based on weather data with exceptions if some important dates are there.

Any ideas how this could be achieved?

I was not able to find anything :frowning:

I have already created sensor which is allowing me to separate day/night + weather data. But how to get something like “IF” clause there?

1 post - 1 participant

Read full topic


Energy consumption from file

Template error to fix

$
0
0

I begin to get an error about this template and till some days ago it was working properly.

  - condition: template
    value_template: {{ (as_timestamp(now()) as_timestamp(states.input_boolean.mauhome.last_updated))< 360 }}

Can someone help me to trace the error and fix it?

3 posts - 2 participants

Read full topic

Preferred mesh routes?

$
0
0

Hi

i have a little problem with my sonoff humidity sensors when it comes to zigbee connectivity.

Example:
I have a humidity sensor in my bathroom and 3 tradfri lamps. Also a tradfri socket which is always on. Unfortunately i cant teach my familiy to not turn off the 3 tradfri lamps when they leave the room (oh god… i’ve tried…) and when they get offline, the sensor sometimes is not available until the lamps come back on.

Can i configure it somehow that my sensors always prefer the routes via the always-on devices? I am using the ZHA integration

thanks!

1 post - 1 participant

Read full topic

Template attributes formatting

$
0
0

Hi,

I’ve managed to create a template sensor that adds values to an attribute, but I’m struggling to get the right format. Ideally, I’d create an array here instead, and it would probably make this more user-friendly later.
Is there a way to make this into an array, or comma-separated value if a result = true, or something like that?

          {% set today = now().strftime('%d/%m/%Y') %}
          {% set food = states.sensor.matavfall.state %}
          {% set paper = states.sensor.papir.state %}
          {% set rest = states.sensor.restavfall.state %}
          {% if food in today or paper in today or rest in today %}
            {% if food in today %} food {% endif %}
            {% if paper in today %} paper {% endif %}
            {% if rest in today %} residual {% endif %}
          {% else %}
            nothing
          {% endif %}

1 post - 1 participant

Read full topic

Rest-Electical prices

$
0
0

Hi all

I am trying to get the current electrical prices from my electricity company that changes every hour of the day, unfortunately they don’t have a place where it says “price right now” so i have to pull out the data from every single hour over the span of 48 hours. The challenge is that at some random time the whole table shifts one day as the day after will have the new prices.

I have used postman to pull out the data to see what i get from that table view.
GET https://api.obviux.dk/v2/forward-prices/2880
headers:
content-type: application/json
x-customer-ip: 94.18.215.66 (don’t worry not my IP)

This will give the following output.

 {
     "0": {
         "valid_from": "2022-01-16 00:00:00",
         "grid_area": "DK2",
         "price": 123.86375
     },
     "1": {
         "valid_from": "2022-01-16 01:00:00",
         "grid_area": "DK2",
         "price": 123.0825
     },

(this is only two out of 48)

I have searched through the internet to find a way to only pull the data from the current date and hour, but havn’t been successful (i might be too stupid :P)

What i did was pulling every single field in the table out in a sensor like this.

 rest:
   resource: https://api.obviux.dk/v2/forward-prices/2880
   scan_interval: 86400
   headers:
     Content-Type: application/json
     x-customer-ip: 94.18.215.66
     user-agent: okhttp/4.8.0
   sensor:
     - name: "El Pris 0"
       device_class: monetary
       unit_of_measurement: "DKK"
       json_attributes_path: "$.[0]"
       value_template: '{{ value_json["0"]["price"] }}'
       json_attributes:
         - valid_from
         - price
     - name: "El Pris 1"
       device_class: monetary
       unit_of_measurement: "DKK"
       json_attributes_path: "$.[1]"
       value_template: '{{ value_json["1"]["price"] }}'
       json_attributes:
         - valid_from
         - price

This leaves thease sensors in HA

The problem with this is that it takes AGES to load HA because of this.
I would really like to find a way where i only have 1 sensor with the current date and time.

Is there anyone with a master brain that can help me figure out what to do?

3 posts - 2 participants

Read full topic

Home Assistant always disables my Hue motion sensor

$
0
0

Hi all,

I was hoping someone might be able to help, this problem only started with one of the latest upgrades of HA.
I’m currently on: core-2021.12.3
What I have is a simple Arduino button in my bedroom, which turns of everything when I lie down, by sending an MQTT publish to a certain topic.

I then use:

- id: '1586610136890'
  alias: Bedroom_turn everything off
  description: ''
  trigger:
  - payload: 'true'
    platform: mqtt
    topic: Topic/Bedroom
  condition: []
  action:
  - data: {}
    entity_id: all
    service: light.turn_off
  - data: {}
    entity_id: all
    service: switch.turn_off

Every morning I get up, I have to then enable the hue motion sensor manually via the Hue app.
I had this button for about 1 year already, never was a problem, but all of a sudden, it disables the hue sensor (not the entity).
Anyone an idea why or what I could improve?
The reason btw, why I use entity_id all, because groups are tedious to maintain :relaxed:

Thanks a lot for your help

1 post - 1 participant

Read full topic

Electric meter index update with the total consumption sensor

$
0
0

Hi
I’m searching for a solution to update my electric meter.

I have a shelly EM which is reading the energy consumption. (sensor.energy_total = 34.54Kwh)
and i have the index from the energy meter 12345 (input_number.energy).

I would like to have a sensor which calculates the index of meter. Curent index + consumption (12345+34.54)
I tried with this automation:

alias: Update Energy Meter
description: ''
trigger:
  - platform: time_pattern
    minutes: '*'
condition: []
action:
  - service: input_number.set_value
    data_template:
      entity_id: input_number.energy
      value: >-
        {{ states('input_enenrgy.energy')|float +
        states('sensor.total_energy')|float }}
mode: single

but it always get the value of shelly sensor.

2 posts - 2 participants

Read full topic


Time Based Trigger Not Working

$
0
0

This time based automation is not firing at 4am as it should.

I’ve checked that the service calls, if I “run automation” it works but left to time it doesn’t. Running on Ri 4 and the timezone is set correctly. Could someone help?

alias: Set Morning Thermostat to 76f
description: ''
trigger:
  - platform: time
    at: '04:00:00'
condition:
  - condition: device
    device_id: 4fcee45741653467dcb0424c22e0960d
    domain: climate
    entity_id: climate.main_house_ac
    type: is_hvac_mode
    hvac_mode: heat
action:
  - service: climate.set_temperature
    data:
      temperature: 76
    target:
      entity_id: climate.main_house_ac
mode: single

2 posts - 2 participants

Read full topic

Change room temperature on leaving zone

$
0
0

Hi, I am fairly new to HA. I’ve created my own room temp control using a basic sonoff (esphome) to control radiator valves. Automation rules respond to helper variables set via sliders that control helper variables. It works well.

But the ultimate goal was to change the radiator target temperature automatically to a lower value when leaving home.

Setting up an automation rule triggered by leaving zone is understood. However, in the automation action I would like to change the variable input_number.temp_living_room to a lower value.

1 post - 1 participant

Read full topic

Or Automation help

$
0
0

I’m new to this or but trying to make a simple OR automation where if motion is detected and either my phone or my partners is showing home then it will call the heating however my automation is getting stuck at the first variable which is my phone not being home. I stared out the devices ID’s just in case :smiley:

  alias: Heating boost from motion
  description: ''
  trigger:
  - type: motion
    platform: device
    device_id: *****
    entity_id: binary_sensor.hivehome_com_mot003_ias_zone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 0
  condition:
  - condition: or
    conditions:
    - condition: device
      device_id: ******
      domain: device_tracker
      entity_id: device_tracker.adams_iphone_2
      type: is_home
  - condition: device
    device_id: *******
    domain: device_tracker
    entity_id: device_tracker.hannahs_iphone_2
    type: is_home
  - condition: time
    after: 08:30
    before: '16:30'
  action:
  - service: hive.boost_heating_on
    target:
      device_id: *******
    data:
      time_period: 00:15:00
      temperature: 20
  mode: single

3 posts - 2 participants

Read full topic

Cannot get button_pressed event to work with state condition

$
0
0

I have tried to get the automation config listed, working with a state condition, but I did not succeed, Did read a lot of posts and documentation. What I want to establish is change the UP button action on the remote acting like a DOWN button (state= closed) if the last press was an UP also (State=open) .
my code:

   - alias: 'Steren remote Up'     #   Up button 
     trigger:
       - platform: event
         event_type: button_pressed
         event_data:
           entity_id: cover.55_study_blind  
           state: 'up'             # this is what the event data lists
     condition:                       # when I leave the condition section out, action is executed
         condition: state             # when included that section, action is not executed
         entity_id: cover.55_study_blind
         state: 'open'                # this is what developer tool list as the state
     action:
       - service: notify.notify
         data:
          message: pressed but.{{trigger.event.data.state}} in remoteUp

1 post - 1 participant

Read full topic

Correct Syntax for Auto Entities Template including Multiple-Entity-Row

$
0
0

Hi,

I have the following sensor with this formatted output:

Now I want to reformat this in the auto entities card but I only get so far:

How is the correct formatting looking after line 13 ‘state_header’: “Status”,

1 post - 1 participant

Read full topic

Viewing all 106117 articles
Browse latest View live


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