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

Multistate light

$
0
0

@adamkrol wrote:

Hi

I am new proud user of home assistant in my home.
My installation is based on mysensors which exposes all “relays” to HA. The problem I have is how to show and manipulate with ceiling light which have 2 “zones”.
There are 5 bulbs in one ceiling light. One relay is connected to two of them (zone A) and another is connected to 3 of them (zone B).
Now I have two switches for zone A and for zone B. This is not the best solution I think.
Question is if there is lovelace solution for one switch, light card which have multiple stages.
Sth like:
bulbs

Any ideas?

Posts: 3

Participants: 2

Read full topic


MQTT Problems with 0.101 release

$
0
0

@maurizio53 wrote:

I am having serious problems with mqtt component when upgrading to 0.101.3 from 0.100.3.
Is this configuration correct related to the breaking changes listed in the 0.101 release?

mqtt:
  broker: !secret mqtt_broker
  username: !secret mqtt_username
  password: !secret mqtt_password
  discovery: true
  discovery_prefix: homeassistant

and about lights:

  - platform: mqtt
    name: "Faretti Ingresso"
    command_topic: "cmnd/sonoff-01/power"
    state_topic: "stat/sonoff-01/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: true

Posts: 21

Participants: 3

Read full topic

Use KNX switch to control media_player volume

$
0
0

@Wouter1 wrote:

I have been experimenting with controlling my media_player volume through a KNX switch. The approach I used was to use a dimming object in KNX. The volume adjustment catches the on/off switch events in Home Assistant, using automation to adjust the volume in steps. The long-press in KNX generates the dimming action in KNX, which I catch and use to trigger play/ pause automations.

Relevant parts from configuration.yaml:

knx:
  tunneling:
    ...
  fire_event: true
  fire_event_filter: ["3/5/*"]

automation:
  - alias: "Increase Volumer"
    trigger:
      platform: event
      event_type: knx_event
      event_data:
        address: '3/5/0'
        data: 1
    condition:
      condition: template
      value_template: "{{ (float(states('sensor.volume_achterkamer')) <= 0.9) }}"
    action:
      - service: media_player.volume_set
        data_template:
          entity_id: media_player.achterkamer
          volume_level: '{{ (float(states("sensor.volume_achterkamer")) + 0.1) | round(2) }}'
  - alias: "Decrease Volume"
    trigger:
      platform: event
      event_type: knx_event
      event_data:
        address: '3/5/0'
        data: 0
    condition:
      condition: template
      value_template: "{{ (float(states('sensor.volume_achterkamer')) > 0.1) }}"
    action:
      - service: media_player.volume_set
        data_template:
          entity_id: media_player.achterkamer
          volume_level: '{{ (float(states("sensor.volume_achterkamer")) - 0.1) | round(2) }}'
  - alias: "Media Play"
    trigger:
      platform: event
      event_type: knx_event
      event_data:
        address: '3/5/2'
        data: 9
    action:
      service: media_player.media_play
      entity_id: media_player.achterkamer
  - alias: "Media Pause"
    trigger:
      platform: event
      event_type: knx_event
      event_data:
        address: '3/5/2'
        data: 1
    action:
      service: media_player.media_pause
      entity_id: media_player.achterkamer

The result is that you need multiple presses of a button to lower the volume in discrete steps (in this case 10% of volume, but you can off-course take bigger or smaller steps), and can use the long-press for media play/pause. This works fine. In the ideal case however, I would like to have a long press continually lower/ increase the volume until the button is released. Short press can then be used for play/ pause. Is there anybody who got that working, or has any ideas for alternative approaches?

Posts: 1

Participants: 1

Read full topic

Rename an entity

$
0
0

@Makis wrote:

I have some covers for example with the following name

cover.50758014840d8e918614

I have use them in several automations. If I rename the entity through fronted will the still valid in my automations or I should change the name one by one?

Also if I add one new one, under which name I will find the above entity assuming I renamed it to “window 1” ?

Thanks

Posts: 3

Participants: 2

Read full topic

Template for sensor with too many digits

$
0
0

@Klagio wrote:

Hi I have a power sensor (Shelly EM) that gives power with 6 digits

567.123456 W

Wish to have no digits. How to create a new sensor, sorry very bad at templating. ALso is it possible to NOT crreate a new sensor and use template in Lovelace?

Posts: 3

Participants: 3

Read full topic

Template in Action

$
0
0

@hub4code wrote:

I try to use a template value in a automation (action), but I do something wrong??

Action is:

entity_id: media_player.kodi
media_content_id: |
  "{{ state_attr('media_player.kodi', 'media_content_id') + 1 | int }}"
media_content_type: CHANNEL

When I test the template in the template-editor it shows me the right channel number.
When I test the service whit a number instead of the template it works also.

The log shows the following error:

"ValueError: invalid literal for int() with base 10: '"{{ state_attr(\'media_player.kodi\', \'media_content_id\') + 1 | int }}"\n'"

I tried alos with data_template and service_template, but always the same error.

What do I have to chance to use the template in a action??
Thanks

Posts: 17

Participants: 4

Read full topic

Comparing char received from a shell_command in a light_template value_template

$
0
0

@ky56 wrote:

Hi, I have just started using Home Assistant and I have a custom controller that I would like to add.

The following configuration works perfectly:

switch:
  platform: command_line
  switches:
    room_light:
      command_on: "/usr/bin/curl -s -o /dev/null -X GET <URL>“
      command_off: "/usr/bin/curl -s -o /dev/null -X GET <URL>”
      command_state: "/usr/bin/curl -s -X GET <URL>”
      value_template: '{{ value == "1" }}'
      friendly_name: "Room Light"

but its supposed to be a light switch so I tried replicating it using template light and I can’t figure out how to make the value_template to work. This is what I have so far and the on / off works fine its updating the current value that doesn’t.

shell_command:
    wib_out_3_1: "/usr/bin/curl -s -o /dev/null -X GET <URL>“
    wib_out_3_0: "/usr/bin/curl -s -o /dev/null -X GET <URL>"
    wib_out_3_t: "/usr/bin/curl -s -o /dev/null -X GET <URL>"
    wib_pin_3: "/usr/bin/curl -s -X GET <URL>"

light:
  - platform: template
    lights:
      room_light:
        friendly_name: "Room Light"
        value_template: '{{ shell_command.wib_pin_3 == "1" }}'
        turn_on:
        - service: shell_command.wib_out_3_1
#          data:
#            entity_id: switch.kitchen_lights
        turn_off:
        - service: shell_command.wib_out_3_0
#          data:
#            entity_id: switch.kitchen_lights

wib_pin_3 is supposed to return the same get request as command_state which is 1 for on and 0 for off. No JSON or anything just a single char. What am I doing wrong with the value_template?

Posts: 8

Participants: 2

Read full topic

Very basic input select with thermostat states

$
0
0

@lkeays wrote:

Hi,
I’ve tried many things so far and I can’t get to do this:

Input select
-Home
-Away
-Reset

# in configuration.yaml
input_select:
  thermostat_mode:
    name: Thermostat Mode
    options:
      - "away"
      - "home"
      - "Reset"
    icon: mdi:target

and then in

# in automation.yaml
  - alias: set the heat
    trigger:
      - platform: state
        entity_id: input_select.thermostat_mode
    action:
      - service: switch.turn_on
        entity_id: climate.home
        preset_mode: "{{ trigger.to_state.state }}"

in the official doc, there is even this specific case used as an example. But I can’t find anywhere in that doc where to link my entidy_ID.

The platform I’m using for heat is Honnywell EvoHome. Thersmostats etc work fine in my dashboards.

Thanks

Posts: 5

Participants: 2

Read full topic


Run out of USB Ports?

$
0
0

@jriker1 wrote:

I am curious. I was planning out something and didn’t know how to deal with lack of USB ports:

  1. Want a USB Zigbee stick
  2. Want a USB Z-Wave Plus stick
  3. Want a USB modem for Caller ID

If I only have 2 USB ports, and don’t want the USB stick that combines Zigbee and Z-Wave because I hear it’s not really Z-Wave Plus, what can be done? A USB hub wouldn’t work would it? Wasn’t sure if the ports would be detected or if the whole hub would be seen as one port.

Posts: 4

Participants: 4

Read full topic

Program name in syslog

$
0
0

@renwickr wrote:

Hi all,
I am currently sending messages via syslog to be parsed remotely and the “program name” is always “Home Assistant” which is ok for us Humans but the remote parser really hates the space. Is there a way to change the name that gets used when getting HASS to log messages?

I might be able to do it using some clever rsyslog features if I can upgrade from the standard syslog, but it would be better to have the source use a different string if I can.

I am using Home Assistant and not hass.io in case it matters :slight_smile:

Example syslog message is: Nov 12, 2019 @ 09:14:40.000 Home Assistant[523]: my-message-here

Thanks for any help.

Rich

Posts: 1

Participants: 1

Read full topic

Can’t set Heat for RCS TBZ48 tstat

$
0
0

@KHA wrote:

Hi all, I’ve looked through here and reddit and can’t find a solution to my issue.

I have 2 RCS TBZ48 thermostats and I can’t set the Heat for either.

This morning I removed the batteries and did a factory reset on one of the units and re-joined it to the hub (this unit runs on 24v with a battery backup (I guess - even with good batteries, when i remove the 24v’s, the tstat shuts off?)

It shows up as 4 different devices in HA (see below), so I added all 4 as tstats In Lovelace, through the UI.
All of them can change the mode from auto to heat to ac to off and one (cooling_1_3) can set the cooling temp, none can read or set the heating set point.

Interestingly enough, when the tstat is in heat mode and I set a temp on the cooling entity, the tstat flips to cooling, sets that temp then flips back to heating mode. (Still at the same set point it was before)

these are the 4 Entities that were added
climate.residential_control_systems_unknown_type_5442_id_5432_away_heating_3
climate.residential_control_systems_unknown_type_5442_id_5432_cooling_1_3
climate.residential_control_systems_unknown_type_5442_id_5432_cooling_econ_3
climate.residential_control_systems_unknown_type_5442_id_5432_unused_3_3

Posts: 1

Participants: 1

Read full topic

Open the cover if someone opens the window

$
0
0

@Dreamoffice wrote:

Hi

i would like to open the cover to value “10” if it is closed. but i can not find where the problem is. who can tell me my mistake?

- id: rolladen_esszimmer_auf
  alias: rollladen im esszimmer wird auf 90 prozent hochgefahren wenn er geschlossen war
  description: 'wenn fenster auf dann rolladen hoch'
  trigger:
  - entity_id: binary_sensor.neq1838379_state
    platform: state
    to: 'on'
  condition:
    condition: numeric_state
    entity_id: cover.ez_rollo
    below: 9
  action:
  - service: cover.set_cover_position
    data:
      entity_id: cover.ez_rollo
      position: 10

Posts: 2

Participants: 2

Read full topic

Dashboard Scheduled Display

$
0
0

@spurgelaurels wrote:

Currently using Lovelace on an iPad with a few tabs to display relevant information. But I’d rather not have to interact with the tablet, and most of the information is time-context specific.
For example, at night, I’d love to show a tab that only has the weather, next morning’s meetings, and a few light scenes. Then in the morning, I’d want it to show commute information, weather, and maybe a music playlist.

Is there a way to specify which lovelace tab is open on a schedule, but only on a specific device? (Other devices need to be independent of this). Sure, I could use browser plugins (tabrotate, etc), but would rather this is native.

Posts: 1

Participants: 1

Read full topic

Aqara Motion Sensor Hack for 5 sec

$
0
0

@adrez99 wrote:

I’ve got an Aqara Motion Sensor paired with ZHA and I’ve modded it to send motion every 5 seconds instead of 2 minutes with this guide:

The behaviour hasn’t changed after completing the mod, and I’ve seen that with Zigbee2mqtt it is required to change occupancy_timeout to work around that:

¿Does something like this exists in ZHA? ¿Is there any workaround available in ZHA so that I can use the mod?

Posts: 1

Participants: 1

Read full topic

Template from Wh to KWh

$
0
0

@Klagio wrote:

Hi I have this REST data

“emeters”:[{“power”:811.25,“reactive”:-507.50,“voltage”:227.16,“is_valid”:true,“total”:2264.8,“total_returned”:0.0},

using this REST sensor I able to get the ENERGY value but its in Wh, I need KWh.

Please help in how to change the template


  - platform: rest
    resource: http://192.168.1.150/status
    name: Potenza Generale Consumata
    value_template: '{{ value_json.emeters[0]["total"]  }}'
    scan_interval: 10
    unit_of_measurement: "KWh"

Posts: 3

Participants: 2

Read full topic


Help with project for Firewood Calculation

$
0
0

@argykaraz wrote:

I am trying to figure out how to do this project, but I am having trouble. I tried some things, but the final result was not what I wanted. If you guys help me out with this, I will put the complete project in Share your Projects category for others to see.

The purpose of the project:
My main heating is a fireplace with a watertank that heats the water every time I start the fire. The water is going through radiators in every room to achieve the maximum heating possible. There is no thermostat (duh), because you cant turn on or off the fire on-demand, unless of course if you stop feeding wood.
I already have an excel that I am writing down some values that will make me understand how I can use the fireplace more efficiently.
What time I started the fire, what was the outside and inside temperature at that time, how many hours was the fireplace on, what was the maximum temperature reached and what was the outside temperature at that time. And most important, how many firewood did I use (in kilos).

What I am trying to do:
I am trying to automate as much info as I can in HA.
I am thinking of a button to indicate I started the fire and automatically record the inside and outside temperature as well as the time.
Then I can have a button with a number dial, that will add the weight of the firewood I put in the fire. That particular thing can happen 5-10 times per day so the numbers can be from 5 to 15 kilos each time and can reach a total of 70, so I need the calculator to add the numbers I enter.
During the day and when the fireplace is on it will record the maximum temperature reached in the house and the current temperature outside.
When the fireplace is off, everything will be recorded into a file (preferably an excel or csv - can it be?) and will reset a new day.

This might look easy for some of you, but I am struggling with this and I would be grateful if you could help me out!
Also, if you have any suggestions regarding my thoughts or my procedures, I am all ears!
Thanks a lot!

Posts: 8

Participants: 3

Read full topic

Data template in timer duration

$
0
0

@tortfeaser wrote:

Hi there,

I’m trying to create an automation for my salt water pool chlorine generator. The time the chlorinator must be active and therefore generating chlorine is dependant on the temperature of the water. The hotter it is, the more chlorine is required.

So I want an automation that switches the chlorinator on at sunset and turns off some time later, where the time is determined by pool temp (deg C) * 12. IE for every degree the chlorinator runs for 12 minutes.

My config info is below.

The trouble is that I don’t seem to be able to use any sort of variable for timer duration. The config below, for example, gives the error: extra keys not allowed @ data['data_template']

Is there any other option?

I have a sensor that determines this time:

## Pool chlorinator time needed
- platform: template
  sensors:
    chlorinate_time:
      value_template: >-
        {% set time = (states('sensor.pool_temp')|float)|round * 720 %}
        {% set minutes = ((time % 3600) / 60) | int %}
        {% set hours = ((time % 86400) / 3600) | int %}
        "{{ "%02d" | format(hours) }}:{{"%02d" | format(minutes)}}"

sensor.chlorinate_time returns a value like “02:36”

I have a timer set in configuration.yaml:

## timers
timer:
  pool_pm:

And I have two automations (nb the chlorinator uses a climate integration as a hack, there is no pool chlorinator component):

- id: chlorinator-on-pm
  alias: chlorinator-on-pm
  description: 'Turn on pool chlorinator at sunset'
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - service: climate.set_temperature
    data:
      entity_id: climate.chlorinator
      temperature: 100
  - service: timer.start
    data_template:
      entity_id: timer.pool_pm
      duration: '{{states('sensor.chlorinate_time')}}'

- id: chlorinator-off-pm
  alias: chlorinator-off-pm
  description: Turn off pool chlorinator after temp-calc duration
  trigger:
  - event_data:
      entity_id: timer.pool_pm
    event_type: timer.finished
    platform: event
  condition: []
  action:
  - data:
      entity_id: climate.chlorinator
      temperature: 0
    service: climate.set_temperature

Posts: 4

Participants: 2

Read full topic

Problem with conditional card

$
0
0

@HorizonKane wrote:

Hi all,

long time no see :slight_smile: Had a lot of other stuff to do and not thaaat much time for my HA.

However I am creating some new stuff right now and I am facing a problem with a conditional card.

My code looks like this:

    cards:
      - type: vertical-stack
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: input_boolean.mode_fruehschicht
              - type: conditional
                conditions:
                  - entity: input_boolean.mode_nightheat
                    state: "off"
                card:
                  - type: custom:button-card
                    entity: input_boolean.mode_eco
              - type: conditional
                conditions:
                  - entity: input_boolean.mode_nightheat
                    state: "on"
                card:
                  - type: custom:button-card
                    entity: input_boolean.mode_nightheat
              - type: custom:button-card
                entity: input_boolean.mode_boost
              - type: custom:button-card
                entity: input_boolean.mode_zeroheat
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: input_boolean.mode_movie
              - type: custom:button-card
                entity: input_boolean.mode_zock
              - type: custom:button-card
                entity: input_boolean.mode_cooking
              - type: custom:button-card
                entity: input_boolean.mode_dinner

Without the conditional stuff it was all fine. But like this, I get an error in my dashboard:

No card type configured.
[
  {
    "type": "custom:button-card",
    "entity": "input_boolean.mode_nightheat"
  }
]

Any hint whats wrong?

Thanks in advance!

Posts: 2

Participants: 1

Read full topic

Help with mapping values from Input_select

$
0
0

@lkeays wrote:

Hi, I’ve been trying to map my input_select to an automation but I failed after long hours to figure out how to write the mapping code.

I need to feed this from my input select. data: {“event”:“DATA in HERE”}

Thanks for helping.

  - alias: set the heat
    trigger:
      - platform: state
        entity_id: input_select.thermostat_mode
    action:
      service: ifttt.trigger
      
      ##########################
      # The line here works.  But I fail to figure out how to write that command using the data from my input select.
      # data: {"event":"ha_evo_off"}
      ##########################
      
      # I fail to understand how to map my input_select values to replace the "ha_evo_off" above
      # This below doesn't work.
      
      data_template:
        preset_mode: >
          {% if is_state("input_select.thermostat_mode", "Zet Uit (off)") %}
            ha_evo_off
          {% elif is_state("input_select.thermostat_mode", "Reset") %}
            ha_evo_reset
          {% elif is_state("input_select.thermostat_mode", "Woonkamer Opwarmen") %}
            ha_evo_warmup
          {% elif is_state("input_select.thermostat_mode", "Tijdelijk Weg") %}
            ha_evo_away
          {% else %}
            ha_evo_reset
          {% endif %}
      data: {"event":preset_mode}

P.S. I am using IFTTT to achieve this since I wasn’t able to set my thermostat state directly from HA. :frowning:

Posts: 7

Participants: 4

Read full topic

How to debug [homeassistant.components.websocket_api.http.connection] errors

$
0
0

@flyingpenguin wrote:

I keep getting these [homeassistant.components.websocket_api.http.connection] errors at the rate of about 100 per day:

2019-11-12 21:16:55 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1826670608] Client exceeded max pending messages [2]: 512
2019-11-12 21:16:55 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1826670608] Connection closed by client
2019-11-12 21:57:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Client exceeded max pending messages [2]: 512
2019-11-12 21:57:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Client exceeded max pending messages [2]: 512
2019-11-12 21:57:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Client exceeded max pending messages [2]: 512
2019-11-12 21:57:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Client exceeded max pending messages [2]: 512
2019-11-12 21:57:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Client exceeded max pending messages [2]: 512
2019-11-12 21:57:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Client exceeded max pending messages [2]: 512
2019-11-12 21:57:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Client exceeded max pending messages [2]: 512
2019-11-12 21:57:15 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1822849808] Connection closed by client
2019-11-12 22:06:46 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1829056272] Client exceeded max pending messages [2]: 512
2019-11-12 22:06:46 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1829056272] Connection closed by client
2019-11-12 22:17:13 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1816469904] Connection closed by client
2019-11-12 22:20:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1822369040] Client exceeded max pending messages [2]: 512
2019-11-12 22:20:56 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1822369040] Connection closed by client
2019-11-12 22:58:12 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1816955440] Connection closed by client
2019-11-12 23:06:24 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1802428176] Connection closed by client
2019-11-12 23:15:04 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1816314320] Client exceeded max pending messages [2]: 512
2019-11-12 23:15:04 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1816314320] Connection closed by client
2019-11-12 23:19:16 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1819042640] Connection closed by client
2019-11-12 23:25:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1823064944] Client exceeded max pending messages [2]: 512
2019-11-12 23:25:00 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1823064944] Connection closed by client
2019-11-13 07:12:20 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1827136784] Connection closed by client
2019-11-13 07:15:27 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1843024496] Connection closed by client
2019-11-13 07:21:30 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1821364752] Connection closed by client
2019-11-13 08:43:47 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1827136400] Connection closed by client
2019-11-13 08:44:03 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1826669392] Connection closed by client
2019-11-13 11:30:00 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1807985840] Connection closed by client
2019-11-13 11:34:06 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1827583280] Client exceeded max pending messages [2]: 512
2019-11-13 11:34:06 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.1827583280] Connection closed by client

Other forum posts regarding the subject are inconclusive, so want to dig deeper and see what is causing this for my specific situation.

In my initial attempt to debug I am using this:

logger:
  default: error
  logs:
    homeassistant.components.websocket_api: info

but nothing points to a real culprit. Setting log level for homeassistant.components.websocket_api to debug creates an overwhelming soup of information in the log that I find hard to analyze.

Any suggestions?

Posts: 1

Participants: 1

Read full topic

Viewing all 109015 articles
Browse latest View live


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