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

Help needed for mqtt multi sensor/switch device with autodiscovery

$
0
0

@qbus_r wrote:

Hi all,
right now I have my home setup centralised in control cabinet in my garage - all lights, sockets I’d like to toggle, wall light buttons, pirs and da temperature sensor are in this cabinet.
I also have multiple Arduino mega+w5100 devices to read from buttons/pins and steer lights and sockets via relays (all through mqtt protocol). every switch has own topics, every button sends 1/2/3 (depending on short press, double press, hold) to mqtt on its own topic.
Right now I would like to write new sketch for Arduino, this time with autodiscovery. Has anyone written something like that and would like to share ? how should I config the "device"in the registry ? can I have “device” in area garage that steer light in area kitchen ?
is there maybe something like tasmota or esphome but for mega with Eth (not WiFi)? all I found was for esp :frowning:

Posts: 2

Participants: 2

Read full topic


Automation dimming lights on movement after sunset

$
0
0

@sandoz.cloud wrote:

i am trying to make a automation, that brightens and dims lights after sunset after movement is detected by xiaomi body sensor
The lights are turned on by another automation when the sun is down, at 30%
I want them to 90% for 3 minutes, and then return to 30% again
I am using xiaomi body sensors for this

I currently use this, brightening to 90% is ok, but they dont go back to 30 after 3 minutes

- alias: "Garage links On"
  trigger:
    - platform: state
      entity_id: binary_sensor.motion_garage_occupancy
      to: 'on'
  condition:
    - condition: state
      entity_id: sun.sun
      state: below_horizon
  action:
    - service: homeassistant.turn_on
      entity_id: light.garage_links
      data:
        brightness_pct: '90'
        transition: 3
#    - service: notify.notify
#      data:
#        message: Office Motion Light On
        
- alias: "Garage links Off"
  trigger:
    - platform: state
      entity_id: binary_sensor.motion_garage_occupancy
      to: 'off'
      for:
        minutes: 3
  action:
    - service: homeassistant.turn_off
      entity_id: light.garage_links
      data:
        brightness_pct: '30'
        transition: 3
#    - service: notify.notify
#      data:
#        message: Office Motion Light Off

Posts: 2

Participants: 2

Read full topic

Help to setup channels in LG TV

$
0
0

@Makis wrote:

Hi
I am trying to change channels in my LG TV in HA.
I have the following code which works

wake_on_lan: # enables `wake_on_lan` domain

# LG TV
webostv:
  host: 192.168.1.xx
  name: LG TV Webos
  #other settings
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      mac: 'A8:xx:xx:B4:49:xx'
  customize:
    sources:
      - livetv
      - netflix
      - hdmi1
      - hdmi3
      - youtube
        
media_player:

Now I would like to add the channels but I don’t know where to add to the code
I tried various combinations (after the above code,inside the above code but it doesn’t work.
Can someone explain what I have to do ?

wake_on_lan: # enables `wake_on_lan` domain

# LG TV
webostv:
  host: 192.168.1.xx
  name: LG TV Webos
  #other settings
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      mac: 'A8:xx:xx:B4:49:xx'
  customize:
    sources:
      - livetv
      - netflix
      - hdmi1
      - hdmi3
      - youtube
  action: 
    service: media_player.play_media
    data:
      entity_id: media_player.lg_webos_smart_tv
      media_content_id: 1
      media_content_type: "channel"
        
media_player:

Posts: 5

Participants: 2

Read full topic

Recorder ended unfinished session

$
0
0

@hajo62 wrote:

Some days ago I updated to 0.107.1 AND enabled influxdb.
Now I see that the history stops working a while after starting HA with the following log message:

(Recorder) [homeassistant.components.recorder] Ended unfinished session

I’ve found in some threads that migrating to mariadb might help. But what causes the problem and will a migration with history loss really help?

Posts: 2

Participants: 2

Read full topic

Control Yeelight RGB and White in Homekit (suggestion)

$
0
0

@andrepia wrote:

Hi guys!
I wanted to share with you a workaround that I’ve been working on to control my Yeelight Bedside Lamp 2, both RGB colors and white temperature, on my Apple Devices using homekit.
Since the original entity will only let me control RGB colors and brightness on homekit entity, I created a “fake light” using light template that replicates the brightness and color temperature from the Bedside Lamp original entity.
Here’s the code I added on configuration.yaml:

light:
  - platform: template # white light fake entity
    lights:
      yeelight_bedside_white: # name of the fake entity to control white
        value_template: "{{ is_state('light.yeelight_bedside' , 'on') }}" #get status from original entity
        level_template: "{{ state_attr('light.yeelight_bedside', 'brightness')|int }}" #get status from original entity
        temperature_template: "{{ state_attr('light.yeelight_bedside', 'color_temp')|int }}" #get status from original entity
        turn_on:
          - service: light.turn_on
            data_template:
              entity_id: light.yeelight_bedside
              color_temp: 500 # every time I turn the Bedside Lamp using fake entity, it will turn on as 'warm white'
        turn_off: 
          - service: light.turn_off
            data_template:
              entity_id: light.yeelight_suite_bedside_ana
        set_level:
          - service: light.turn_on
            data_template:
              entity_id: light.yeelight_suite_bedside_ana
              brightness: "{{ brightness }}"
        set_temperature:
          - service: light.turn_on
            data_template:
              entity_id: light.yeelight_suite_bedside_ana
              color_temp: "{{ color_temp }}"

This way, I have “2 lights” on my homekit for the same device.

IMG_0161

I’m not sure if it applies to other Yeelight and Alexa or Google, since the only yeelight device I have is this Bedside Lamp 2 and I only use Siri on my iPhone for now.

Posts: 1

Participants: 1

Read full topic

Met.no automation

$
0
0

@viennacalling wrote:

Hi,

is it possible to use the met.no integration? I have not found any examples for it.
In specific I’m trying to configure my covers to go up if wind is over X km/h

Thank you!

Posts: 1

Participants: 1

Read full topic

FGS-213 + PIR + Switch

$
0
0

@MickBru wrote:

Hi!

I have:

  • FGS-213 switch to control a light (working :ok_hand: )
  • PIR sensor to switch the light on on presence detection (working :ok_hand: )
  • A wall switch, wired to the S1 entry of FGS for local light control (working :ok_hand: )

My problem is:

  • I switch the light on with the wall switch, the light is on
  • The PIR sensor see a move, the light stay on
  • After 60s without motion in front of the PIR, the light is switched off

My need: how to use the wall switch to force the light on, regardless of the PIR input?

I think it’s juste a config of the FGS, but I can’t find it out :thinking:

Thanks!
Mike

Posts: 1

Participants: 1

Read full topic

3 state "sensor" configuration

$
0
0

@Parazeet wrote:

Hi everyone,

I have a Sonoff Dual R2 with Tasmota and MQTT on it, that will be used for a roller shutter. It’s configured in Interlock mode so both relay can’t be on simultanously.

I have setup a card with up, stop and down button.
Relays will reset after the action is done (let’s say shutter takes 25 secs to fully rise, relay will stop after 30 secs to make sure it’s fully up).

I’d like a card on Hassio telling me the state :

  • If down and stop button not used : closed
  • If down or up and stop button used : partially open
  • If up and stop button not used : open

There will be a shutter switch too, so if rise/lower action is interrupted with the switch I’d like the sate to be up to date on Hassio.

Any clue how I should proceed ?

Thanks

Posts: 2

Participants: 2

Read full topic


Change Icon Color Binary_Sensor

$
0
0

@Simone_Valmacco wrote:

HI All!
I’m moving my first steps into HA, I’m trying the Ping component to check if my network devices are online:


I can already use it, but it’s possible to change the icon color based on the status of the devices? for example RED if disconnected and GREEN if it’s connected…
I’ve tryed this code in the customize.yaml file but it doesn’t work…
Any help?

binary_sensor.pfsense:
   templates:
        rgb_color: "if (state === 'Connesso') return [255, 255, 0]; else return [255, 0, 0];"

Thank you very much!
Simone

Posts: 3

Participants: 3

Read full topic

UI in yaml mode

$
0
0

@ninjadog wrote:

Mmm, strange but why is this configuration.yaml code, throwing an error in the log:-

lovelace:
  mode: yaml
  resources:
    - url: /local/simple-thermostat.js?v=1
      type: module
Mar 22 21:53:06 pi hass[28675]: 2020-03-22 21:53:06 ERROR (MainThread) [homeassistant.config] Invalid config for [lovelace]: [resources] is an invalid option for [lovelace]. Check: lovelace->lovelace->resources. (See /home/homeassistant/.homeassistant/configuration.yaml, line 6). Please check the docs at https://www.home-assistant.io/integrations/lovelace
Mar 22 21:53:06 pi hass[28675]: 2020-03-22 21:53:06 ERROR (MainThread) [homeassistant.setup] Setup failed for lovelace: Invalid config.

Seems valid when reading this:

Also, is the /local/ reference, a ref to www in HA config dir (which for me is /home/homeassistant/.homeassistant/www) where my simple-thermostat.js resides?

TIA

Posts: 4

Participants: 2

Read full topic

Can't get to "Node Config Options" for Honeywell ZW3107 Dimmer

$
0
0

@Vikes34 wrote:

Disclaimer, I am new to playing with Home Assistant, about 2 weeks into it. I have been able to get various switches, dimmers and wall outlets up and running. That being said, I am having problems with the Honeywell ZW3107 Dimmer.

It is exhibiting the exact same behavior as described in this thread:

I cannot get it to turn fully off. It will turn off, but the light is left on with a very low modulation, so very dim.

This product is made by Jasco. Who also makes the GE Enbrighten product that is mentioned in the above thread.

Based on the manuals, the configuration parameters for the GE and Honeywell are identical:
GE: http://manual.zwave.eu/backend/make.php?lang=en&sku=28167%20(ZW3104)&cert=ZC10-15080013
Honeywell: {Sorry, being a new user I cannot add a third link to my post. }

But when I follow the directions in the thread, there are no “Node Config Options” available through the GUI to configure.

Here would be a list of questions:

  1. How can I fix this problem?

  2. When you add a node, where do the options and defaults for the product come from? I tried looking through the Home Assistant Repo, but didn’t have any luck.

Any help would be appreciated. Thanks

Posts: 1

Participants: 1

Read full topic

Remote access to pi gpio and sensors and pi-mqtt-gpio

$
0
0

@mick wrote:

Hi all, hope someone can advise. I’m using HA 104.2 installed by hand on a pi 4 running Buster and its working absolutely fine.

I’m also using several remote pi’s around the house with various sensors and switches connected. I have discovered that it can take upto 15 seconds for HA to detect a change in a GPIO pin state, even on a pin on the local pi running HA. Ive used the “interval” which helps but i’ve also read its being degraded and possibly discontinued.

So I have started using mqtt and the package pi-mqtt-gpio, to get over this, which also works very well with exception to getting sensor data back to the HA machine, for some reason the client will not start claiming it cant find the sensor, i’ve tried following the examples where I can, but there are no examples of the HA end (that I could find), I have more experiments to do but If any one can help with this I would be grateful.

My last question is: is it worth installing the current version of HA? 107? Does it fix the GPIO detection delay?

Any help greatly appreciated.

Posts: 1

Participants: 1

Read full topic

Actional Notification: No button showing

$
0
0

@fender4645 wrote:

I’m trying to setup a simple notification that will notify me every night to turn on the alarm. Eventually I’ll add some conditions but trying to keep it simple for now.

Here’s what I have in my configuration.yaml:

ios:
  push:
    categories:
      - name: alarm
        identifier: 'ALARM'
        actions:
          - identifier: 'ARM_ALARM'
            title: 'Arm Alarm'

And this is my automation yaml:

- alias: Notify To Arm Alarm
  hide_entity: true
  trigger:
    - platform: time
      at: '22:00:00'
  action:
    service: notify.mobile_app_chriss_iphone
    data:
      title: "Alarm Check"
      message: "Would you like to arm the alarm?"
      data:
        push:
          badge: 0
          category: "ALARM"

- alias: iOS app notification action ALARM
  hide_entity: true
  trigger:
    platform: event
    event_type: ios.notificaiton_action_fired
    event_data:
      actionName: ARM_ALARM
  action:
    service: alarm_control_panel.alarm_arm_home
    entity_id: alarm_control_panel.ring_alarm

The notification gets sent to my phone phone but without any button. All I see is a basic notification with the ‘Title’ and ‘Message’. Clicking on the notification just sends me to the HA app. Any ideas? Thanks!

Posts: 1

Participants: 1

Read full topic

Xiaomi Wifi - smart plug & IR remote config issues

$
0
0

@kyros21 wrote:

Hi all,

It’s my second configuration within Home assistant, and I encounter some issues to add my Xiaomi wifi smart plug, and my Xiaomi wifi Ir Remote.

I get both token easily with an android phone, and now i’m trying to add switches into my Home assistant.

I double checked my token is exactly 32 digits, and if my ip address are the right one, and everything’s good, but nothing showed up in HA, did I miss something or make something wrong during the configuration ?

Blockquote

# switch - Xiaomi Smart Plug 3680w chuangmi.plug.v2 chuangmi.plug.hmi206
  - platform: xiaomi_miio
    host: 192.168.0.23
    token: 356b9d661b6988157528414594a462eb
    name: Xiaomi Smart Plus 3680w
#     model: chuangmi.plug.v2
# switch - Xiaomi Infrared remote  chuangmi.remote.v2
remote:
  - platform: xiaomi_miio
    host: 192.168.0.14
    token: e9e98bf7c9c6f978213a9ae1fed04e05
    name: Xiaomi Infrared Remote
    slot: 1
    timeout: 30
#     commands:

Blockquote

Thank you for your help.

Posts: 1

Participants: 1

Read full topic

Sonoff basic R1 disconnects from wifi after setting up MQTT integration

$
0
0

@minnixtx wrote:

Details:

Platform: Raspberry Pi 4 - Armbian with Hassio, Home Assistant core 0.107.5
Devices: 3 Sonoff Basics R1 flashed with Tasmota 8.1
Add-ons: File editor, Mosquitto MQTT broker 5.1

I’m having a weird problem. I set up my Sonoff switches with Mosquitto by using “SetOption19 1” through the tasmota console to enable auto discovery. I have set the user and password up on the switches. When I choose MQTT at integration with autodiscover on, the switches are discovered and work for a while. After a day or two days or 3 sometimes, the switches will disconnect from my wifi and have to be re-setup again from scratch by resetting through the tasmota web interface and choosing reset configuration after connecting to their AP by hitting the button 4 times. Then they will reconnect to HA after being discovered by mosquitto. The time it takes them to disconnect again is not regular. Like I said, it could be 1,2, or 3 days.

This does not happen if I do not connect them to HA and just let them run without being integrated. They will run for weeks. As soon as I let them be discovered by mosquitto and integrate them into HA, then they will disconnect eventually and I have to reset their configuration to enable them to connect to the wifi.

If there’s any more info I can provide, please let me know.

EDIT:

I’ve also enabled the ASUS module for discover within configuration.yaml

# ASUSWRT
asuswrt:
host: 192.168.57.1
username: xxxxx
password: xxxxx

Posts: 1

Participants: 1

Read full topic


Google calendar - problem with authorize

$
0
0

@przemor wrote:

I wanted to add google calendar to HA. Unfortunately, doing everything as it is in the instructions https://www.home-assistant.io/integrations/calendar.google/ I got stuck on authorization.
In HA I received a notification about the need for authorization. Unfortunately, clicking the link and entering the code, then choosing a google account and adding permission to access does not add HA access to the account. I see other third-party applications but there is no HA.
What i’m doing wrong?

Posts: 2

Participants: 2

Read full topic

Lovelace card icons (on/off) not changing

$
0
0

@ninjadog wrote:

So I am using yaml based UI and have the following in my <config>/ui-lovelace.yaml

resources:
  - url: /local/simple-thermostat.js?v=1
    type: module
title: KEATS
views:
    cards:
      - type: vertical-stack
        title: HW & CH
        cards:
          - type: entities
            entities:
              - entity: switch.danfoss_rxz3_rf_relay_switching_unit_switch
                name: Hot water
                icon: mdi:water
                state-color: true
              - entity: switch.danfoss_rxz3_rf_relay_switching_unit_switch_2
                name: Central heating
                icon: mdi:radiator
                state-color: true

which correctly gives me:
Capture

But when I slide the on/off button, the icons do not change.
I expect , for water , to use the mdi:water icon and change the icon for on/off states using
mdi:water-on and mdi:water-off ??

What have I done wrong please - obviously probably not understanding icon and entity relationships??

Posts: 2

Participants: 2

Read full topic

State.geo_location in template sensors returns an empty list

$
0
0

@orcinus wrote:

I can’t, for the life of me, figure out what i’m doing wrong here, but i’m sure i’m missing something obvious…

When i try this test Jinja template in the Template tab:

{% set foo = states.geo_location %}
{{ foo | map(attribute='name') | list }}

i get back the list of geo_location domain states as expected:

['M 3.4 - 1km SSW of Kasina, Croatia', 'M 4.6 - 4km WSW of Kasina, Croatia', 'M 5.4 - 3km SW of Kasina, Croatia']

But if i use it in an actual template sensor, i get an empty list:
[]

This happens even if i use the entity_id: sensor.time trick to ensure it’s getting updated.
Any ideas?

PS: Code above is just an example i’m using for debugging purposes… What i’m actually trying to do is something like this:

{% set time = states.geo_location | map(attribute='attributes.time') | max %}
{% set sensor = (sensors | selectattr('attributes.time','eq', time) | list)[0] %}
{{state_attr(sensor.entity_id, "magnitude")}}

… i.e. get the latest earthquake from usgs_earthquakes_feed and use the magnitude as the template sensor value.

PPS: Nothing useful in the logs, no errors.

Posts: 1

Participants: 1

Read full topic

How to Hide Entity Toggle Switch

$
0
0

@dreamzboy wrote:

I’ve been searching high and lows for ways to hide each individual entity but I don’t have any luck. Ideally, I would like to control all the entities with one Header Toggle Button and in place of each entity toggle show the status like “on/off”. One way to do this is put them into groups.yaml but the group parameters don’t even have an option to “hide” or change the look of the toggle button for each entity.

I also tried setting in customize.yaml the following but the toggle switch that for that entity did not hide.

switch.wf_sign:
  icon: mdi:led-strip-variant
  hidden: true

Can you give me some hints on how to accomplish that?

Posts: 3

Participants: 3

Read full topic

How to edit a trigger condition for a numerical difference

$
0
0

@tj1aih wrote:

**About automation edit for a numerical sensor **

I make a RESTful sensor to get my stock tading profit. and i need an [automation] to notify me when the profit rate change fast.

So how to edit a trigger condition for a numerical difference ?

Or how to compare the sensor state with the old state of it ?
I only know set a low or high limit for a numerial for the state of sensor . How can make it for the change of it?

Posts: 4

Participants: 2

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>