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

Notification setup withTelegram, "required key not provided"

$
0
0

@Liese wrote:

Hi,
I tried to setup the notification via TELEGRAM.
I received my ID and API-key in the format as shown below (only some letters changed…).
My first setup has been according a tutorial video.
HA hasn’t been available after several tries, because it seems there is a difference between the syntax with direct ID & API-key input and (like in the video) referencing the secret.yaml file.

So with the following code at least HA is available via Web Interface.

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

telegram_bot:
  - platform: polling
    api_key: "10yyyyyy91:AAFl7yyyyKHY9pTyyyyyyyyk0EJEwMQqgKE"
    allowed_chat_ids:
     - 10xxxxxx82

notify:
  - name: HA_Message
    platform: telegram
    chat_ID: "10xxxxxx82"

But unfortunately the Service HA_Message is not available.

The errors shown in the log are:

2019-12-01 16:41:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data['trigger']. Got None. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/integrations/automation/
2019-12-01 16:41:51 ERROR (MainThread) [homeassistant.config] Invalid config for [notify.telegram]: required key not provided @ data['chat_id']. Got None. (See /config/configuration.yaml, line 24). Please check the docs at https://home-assistant.io/integrations/telegram/
2019-12-01 16:41:53 ERROR (SyncWorker_15) [homeassistant.components.ios.notify] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
2019-12-01 16:43:58 WARNING (zeroconf-ServiceBrowser__esphomelib._tcp.local.) [zeroconf] Exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/zeroconf.py", line 2245, in send
    bytes_sent = s.sendto(packet, 0, (addr, port))
PermissionError: [Errno 1] Operation not permitted
2019-12-01 17:02:38 WARNING (updater) [telegram.vendor.ptb_urllib3.urllib3.connectionpool] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7184ddd0>: Failed to establish a new connection: [Errno -3] Try again')': /bot10yyyyyy91:AAFl7yyyyKHY9pTyyyyyyyyk0EJEwMQqgKE/getUpdates
2019-12-01 17:02:43 WARNING (updater) [telegram.vendor.ptb_urllib3.urllib3.connectionpool] Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by ....

Maybe anybody has idea what’s wrong here?

Best regards,
Jörg

Posts: 7

Participants: 4

Read full topic


Exclude from default config

Sonoff lost in "Devices"

$
0
0

@une18 wrote:

I had some time ago connected a Sonoff Tasmota. It was not connected few weeks. Added it hen in Lovelace as an entity so I can turn it ON/OFF. Wanted to create an automation, but there is no device under MQTT. I have entity for that, but no device. For automation need to use device.

Entered setoption19 1, checked Logging values, updated device list for Mosquitto. Why I can´t see the device?

Posts: 8

Participants: 2

Read full topic

Help needed on climate preset modes in automations

$
0
0

@bedfellow wrote:

I need some help with some automation yaml code to set my thermostat to preset ‘away’ when entity_id ‘group.parents’ is ‘not_home’ and to ‘none’ when they are ‘home’.

So far I have this, but don’t know what to put at the end to set the preset. Do I set it to preset_mode: "away" and preset_mode: "none"?

- id: '1575231618454'
  alias: Thermostat - We're Not Home
  description: ''
  trigger:
  - entity_id: group.parents
    platform: state
    to: away
  condition: []
  action:
  - alias: ''
    data: {}
    service: climate.set_preset_mode
    entity_id: climate.thermostat
- id: '1575231618455'
  alias: Thermostat - We're Home
  description: ''
  trigger:
  - entity_id: group.parents
    platform: state
    to: not_away
  condition: []
  action:
  - alias: ''
    data: {}
    service: climate.set_preset_mode
    entity_id: climate.thermostat

Posts: 3

Participants: 2

Read full topic

MQTT Payload sensor problem

$
0
0

@lebhacker wrote:

hello
i am facing a problem cant get the payload value from mqtt sensor
my payload is the following:

21:27:19 RSL: Energy/tele/SENSOR = {“Time”:“2019-12-01T21:27:19”,“ENERGY”:{“TotalStartTime”:“2019-08-17T11:47:41”,“Total”:48.812,“Yesterday”:11.081,“Today”:4.948,“Period”:0,“Power”:141,“ApparentPower”:278,“ReactivePower”:239,“Factor”:0.51,“Frequency”:51,“Voltage”:223,“Current”:1.249}}

i need to extract each value alone
can anybody helo me ?

Posts: 2

Participants: 2

Read full topic

Combine entities

$
0
0

@merkelbeek wrote:

Hi,

i am not able to display more entites on one card, i am doing this with
Garbage Collection and Garbage collection card

what i now have is like te black borders, but how i want it is like in de red border (with the dates and times)

This is in my ui-lovelace:

#------------------------------------------------------------------------------------------

Afval app

#-------------------------------------------------------------------------------------------
{BLACK BORDERS}
- entity: sensor.rest_afval
icon_color: black
icon_size: 35px
type: custom:garbage-collection-card
- entity: sensor.gft
icon_size: 35px
icon_color: green
type: custom:garbage-collection-card
- entity: sensor.pmd
icon_size: 35px
icon_color: orange
type: custom:garbage-collection-card
- entity: sensor.papier
icon_size: 35px
type: custom:garbage-collection-card
icon_color: brown

  {RED BORDER}  

title: My Card
cards:
- type: glance
verbose_state: True
entities:
- sensor.gft
- sensor.pmd
- sensor.pmd

Posts: 1

Participants: 1

Read full topic

Why won't this switch?

$
0
0

@Ydraiggoch wrote:

Hi. I’m hoping someone could look at my config and tell me if I’ve missed something?

Basically, I have 2 switches (One Sonoff Mini & one Sonoff Basic). All I want to do is to be able to switch either one of them from the Overview page, which seems simple enough. But if I’m honest, I seem to be struggling.

Heres my config

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

mqtt:
  broker: 192.168.1.91
  port: 1883
  username: "Ydraiggoch"
  password: "Password"

switch:
  - platform: mqtt
    name: "Balcony"
    command_topic: "cmd/sonoff01/power"
    state_topic: "stat/sonoff01/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
    
  - platform: mqtt
    name: "Fish"
    command_topic: "cmd/sonoff02/power"
    state_topic: "stat/sonoff02/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

I have the switches visible on the Overview page;

image

But when I try to switch one of them on, it toggles on for about 5 seconds before turning off again automatically.

I suspect this is something to do with the MQTT, but not sure what.

I have the Mosquitto Add On installed and each sonoff is connected (according to the Log & Console in Tasmota.
Here is a snip from the MQTT Log;

1575211104: New connection from 192.168.1.86 on port 1883.
[INFO] found Ydraiggoch on local database
1575211105: New client connected from 192.168.1.86 as DVES_A76427 (p2, c1, k30, u’Ydraiggoch’).
1575211334: Saving in-memory database to /data/mosquitto.db.
1575213135: Saving in-memory database to /data/mosquitto.db.
1575214936: Saving in-memory database to /data/mosquitto.db.
1575216737: Saving in-memory database to /data/mosquitto.db.
1575218538: Saving in-memory database to /data/mosquitto.db.
1575220339: Saving in-memory database to /data/mosquitto.db.
1575222140: Saving in-memory database to /data/mosquitto.db.
1575223941: Saving in-memory database to /data/mosquitto.db.
1575225742: Saving in-memory database to /data/mosquitto.db.
1575227543: Saving in-memory database to /data/mosquitto.db.
1575229344: Saving in-memory database to /data/mosquitto.db.
1575231145: Saving in-memory database to /data/mosquitto.db.
1575232647: Client auto-6265ECCA-A22F-9C79-5C11-D775021797B9 disconnected.
1575232668: New connection from 192.168.1.91 on port 1883.
[INFO] found Ydraiggoch on local database
1575232669: New client connected from 192.168.1.91 as auto-FBF6F6AA-DA5F-52A9-B2CF-4A719AB40635 (p2, c1, k60, u’Ydraiggoch’).
1575232946: Saving in-memory database to /data/mosquitto.db.

191.168.1.86 is one of the switches and 191.168.1.91 is the Home Assistant (Py) and MQTT

Could this have anything to do with both the MQTT and HAS starting at the same time (on the same IP address?

Thanks for any suggestions

Posts: 2

Participants: 2

Read full topic

How to send sensor state with an automation (service: modbus.write_register)

$
0
0

@Bard wrote:

Hi all,
i’m trying to send order through modbus service to an equipment.
This equipment accept only write done with function 16 and in order to satisfy this requirement I must send at least 2 registers with an array.
So I created an input_boolean in order to trigger an automation and with static value is working fine:

 - alias: OnOffCtrlNilan
  trigger:
    - platform: state
      entity_id: input_boolean.accensione_nilan
      to: 'on'
  condition: []
  action:
    service: modbus.write_register
    data:
      hub: Com1
      unit: 4
      address: 1001
    data_template:
      value: [1,2,2]

Now in order to send a single “order” I’m trying to send in the second register the value of the register itself that I’m already reading with a modbus sensor entity.
I wrote the following code:

- alias: OnOffCtrlNilan
  trigger:
    - platform: state
      entity_id: input_boolean.accensione_nilan
      to: 'on'
  condition: []
  action:
    service: modbus.write_register
    data:
      hub: Com1
      unit: 4
      address: 1001
    data_template:
      value: [1,{{ states('sensor.ctrlmode')|int }},2]

but I receive this error: invalid key: “OrderedDict([(“states(‘sensor.ctrlmode’)|int”, None)])”

I checked from the developer tools the state of the sensor and it is:
image

Could you help me?
Thanks in advance
Matteo

Posts: 2

Participants: 2

Read full topic


Z-wave Climate Issue - Missing Thermostat functionality

$
0
0

@jjwBullfrog wrote:

Hi,

I have two Trane Z-Wave thermostats. They worked fine before somewhere before version 0.97-0.100. Now, I only have partial functionality. And what’s really interesting is that one of the almost has no functionality even though they are identical.


What works:

  • HVAC mode - cool, heat, heat_cool, off
  • I can set the cooling temperature target

What doesn’t work:

  • I cannot change the heat target temperature…at least I cannot find it in HA to change it
  • For my second Trane Z-wave, I can’t change/control anything. It has the same entities as the first, but with and “_2” at the end.

What I’ve tried:

  • Uninstalling/reinstalling zwave integration
  • Uninstalling/reinstalling trane devices from my zwave hub
  • Reverting back to 0.97…everything works as expected
  • Opening an issue on github…nothing and its been about a month

Any help would be much appreciated!

Running Hass.io on docker on RPI 3b+

Posts: 1

Participants: 1

Read full topic

Automation with zwave devices - turn on light when move detect

$
0
0

@twiggolo wrote:

hello everybody,
it’s my first automation so please be kind :wink:
I tried to make a simple automation for my walk-in closet.
What I need is to turn on the lights when someone enter the walk-in closet.
I have a motion sensor by fibaro and a wall plug that turn on the light. There’s something that doesn’t work. light is still on, no way to turn off. Neither with switch button on home assistant
Could you help me please?

Here’s the automation…

  • alias: Turn on light when there is movement
    trigger:
    platform: state
    entity_id: binary_sensor.fibaro_system_fgms001_zw5_motion_sensor_sensor
    to: ‘on’
    action:
    service: switch.turn_on
    entity_id: switch.fibaro_system_fgwpe_f_wall_plug_gen5_switch

  • alias: Turn off after last movement
    trigger:
    platform: state
    entity_id: binary_sensor.fibaro_system_fgms001_zw5_motion_sensor_sensor
    to: ‘off’
    for:
    minutes: 1
    action:
    service: switch.turn_off
    entity_id: switch.fibaro_system_fgwpe_f_wall_plug_gen5_switch

Posts: 1

Participants: 1

Read full topic

Multiple InfluxDB

$
0
0

@eyalco wrote:

Hi,

Can I publish data to two different InfluxDB instances (one local and one in cloud)?

Thx

Posts: 2

Participants: 2

Read full topic

Automation with both service and data_template fails

$
0
0

@TheStigh wrote:

Hi,

Been trying to get the data_template to work in this automation (works fine with ‘data’ only and without the {{…}} )

- id: ac_off
  alias: Varmepumpe AV basert på temperatur
  trigger:
  - entity_id: binary_sensor.high_temp_input
    platform: state
    to: 'on'
  - event: start
    platform: homeassistant
  action:
  - entity_id: climate.hytta
    service: climate.turn_off
  - data_template:
      message: "Stua hytta er over {{ input_number.high_temp_stue }} grader, skrur av varmepumpe!"
    service: notify.stigh

The Automation works but no message is pushed… How am I using data_template wrong?

Posts: 3

Participants: 2

Read full topic

Google Cast Group volume setting

$
0
0

@Jokerigno wrote:

Hi all,

I have different gmini grouped in a “broadcast” group. Sporadically I use some of them to stream music so It may happens that they have very different volumes.

That’s why I have an automation that set volume to zero during the night. But I noticed (via automation or via ghome app) that if I change volume to the group it does not apply it to every gmini but it reduces volumes of a certain percentage based on the starting volume of each device.

Can some one please suggest me a way to avoid it?

Thank you in advance

Posts: 1

Participants: 1

Read full topic

Error with default config

$
0
0

@Thomas.dmm wrote:

Hello after upgrade from 0.102.2 to 0.102.3 I have this following error :slight_smile:

Invalid config

The following components and platforms could not be set up:

* [recorder](https://home-assistant.io/integrations/recorder/)
* [history](https://home-assistant.io/integrations/history/)
* [logbook](https://home-assistant.io/integrations/logbook/)
* [default-config](https://home-assistant.io/integrations/default_config/)
* history_stats.sensor

Please check your config.

Can you help me, what i need to check, my config was ok in 102.2 and i don’t change it ?
Thanks

Posts: 4

Participants: 2

Read full topic

Cant get my camera to stream in latest version

$
0
0

@pomah wrote:

Hi, I did manage to get my hikvision camera to work with hass, now when I have done a clean install and switched to hassio on an intel nuc, running hassos, I can get it to show any image, neither still or moving.

Here is my setup in cofiguration.yaml:

# Stream hikvision
camera:
  - platform: generic
    still_image_url: http://user:pass@cameraip/ISAPI/Streaming/channels/100/picture
    stream_source: http://user:pass@cameraip:554/Streaming/Channels/101/
    name: framsidan
    authentication: digest

Any suggestion on what is wrong? it is a hikvision camera, I can get the binary sensor to work without issues, using the same IP, user and pass, so those should work, when pasting the stream_source in e.g. VLC I get it to work as it should.

Posts: 1

Participants: 1

Read full topic


Template for retrieving JSON array values

$
0
0

@trektronic wrote:

I am trying to pull nhl data into home assistant using their api and REST sensor. I am able to pull the data but do not know how to assign the values to different template sensors.

I have a sensor setup to just grab the away team name.

nhl_away_team:
    value_template: '{{ states.sensor.nhl_game.attributes["dates"]["games"]["teams"]["away"]["team"]["name"] }}'

The JSON comes into the Rest Sensor nhl_game like this:

"dates" : [ {
    "date" : "2019-12-01",
    "totalItems" : 1,
    "totalEvents" : 0,
    "totalGames" : 1,
    "totalMatches" : 0,
    "games" : [ {
      "gamePk" : 2019020416,
      "link" : "/api/v1/game/2019020416/feed/live",
      "gameType" : "R",
      "season" : "20192020",
      "gameDate" : "2019-12-01T20:00:00Z",
      "status" : {
        "abstractGameState" : "Final",
        "codedGameState" : "7",
        "detailedState" : "Final",
        "statusCode" : "7",
        "startTimeTBD" : false
      },
      "teams" : {
        "away" : {
          "leagueRecord" : {
            "wins" : 15,
            "losses" : 10,
            "ot" : 3,
            "type" : "league"
          },
          "score" : 2,
          "team" : {
            "id" : 25,
            "name" : "Dallas Stars",
            "link" : "/api/v1/teams/25"
          }
        },
        "home" : {
          "leagueRecord" : {
            "wins" : 12,
            "losses" : 11,
            "ot" : 4,
            "type" : "league"
          },
          "score" : 3,
          "team" : {
            "id" : 30,
            "name" : "Minnesota Wild",
            "link" : "/api/v1/teams/30"
          }
        }
      },

I think that dates, and games are actually arrays of different objects but I do not know how to show this in value templating and could not find examples. My knowledge of JSON is pretty limited. Is this possible with templating?

Posts: 3

Participants: 2

Read full topic

Q; Strange Enocean ID

$
0
0

@CNCman wrote:

Hi !

I have Enocean Nodon wall switch, and Thermokon AirScan app shows very strange ID - 0x358F0C (3510028). 3510028 converted to hex is 0x358F0C.
So in “configuration.yaml” it will be listed as

switch nodon01_0:
  - platform: enocean
    name: Nodon Wall Switch No1-ch0
    id: [0x35,0x8F,0x0C]
    channel: 0

switch nodon01_1:
  - platform: enocean
    name: Nodon Wall Switch No1-ch1
    id: [0x35,0x8F,0x0C]
    channel: 1

Will it work in that way, or there is something wrong with that ID ?
Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Noob needs help with Ikea lights

$
0
0

@chrisd999 wrote:

Hi, I’m still new to HA and have a problem with 2 Ikea Tradfri lights. I have them connected via DeConz and a ConBee II and most of the time they work without a problem. Sometimes however, they both become unavailable, usually between switching on (sunset +10 minutes) and switching off (11pm). Also occasionally, one of the 2 will come on during the day for no apparent reason. I also have a Xiaomi open/close sensor attached the same way which hasn’t suffered any problems.

Apart from looking at the DeConz logs (where I can’t see any obvious errors but that doesn’t mean much) I don’t know how to start diagnosing this. Any help would be greatly appreciated.

Posts: 3

Participants: 2

Read full topic

Wrong automation

$
0
0

@maurizio53 wrote:

What is wrong in this automation as i always get this error when checking the config:

Invalid config for [automation]: extra keys not allowed @ data['condition'][0]['conditions'][0]['to']. Got None
not a valid value for dictionary value @ data['condition'][0]['conditions'][0]['condition']. Got None. (See /config/configuration.yaml, line 35). Please check the docs at https://home-assistant.io/integrations/automation/

This is the automation:

- alias: 'Accendi luci Salotto'
  trigger:
    platform: state
    entity_id: binary_sensor.motion_sensor_158d0001a98a62
    to: 'on'
  condition:
    condition: and
    conditions:  
      - condition: state
        entity_id: group.presenze
        to: 'not_home'
      - condition: template
        value_template: '{{ state_attr("sun.sun", "elevation") < 0.5}}'
      - condition: state
        entity_id: group.all_lights
        state: 'off'
      - condition: template
        value_template: '{{ (as_timestamp(now())-as_timestamp(states.input_boolean.mauhome.last_updated)) < 360 }}'
  action:  
    - service: light.turn_on
      entity_id:
        - light.yeelight_1
      data_template:
        brightness: 255
        rgb_color: ['{{ (range(0, 255)|random) }}','{{ (range(0, 255)|random) }}','{{ (range(0, 255)|random) }}']  
        transition: 10

Posts: 7

Participants: 3

Read full topic

Localtuya JSON decoding errors for some lightbulbs (running 1.0.9 firmware)

$
0
0

@dooz127 wrote:

I’ve tried a couple of different localtuya repositories from github and managed to get my tuya plugs and 1/3 light bulbs integrated with hass using this repository:

And this config:

switch:
  - platform: localtuya
    host: HOST_IP
    local_key: LOCAL_KEY
    device_id: DEVICE_ID
    name: driveway_light_1

But the other two bulbs throw the JSON decoding errors below. The one bulb that is currently working is configured as a switch in hass. I’ve also tried using the localtuya repository from:

and configuring the two non-working bulbs as lights but still no dice.

2019-12-02 08:52:35 DEBUG (SyncWorker_1) [custom_components.localtuya.switch] update: 1
2019-12-02 08:52:35 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] status() entry
2019-12-02 08:52:35 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] json_payload=b'{"gwId":"DEVICE_ID","devId":"DEVICE_ID"}'
2019-12-02 08:52:35 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] status received data=b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00,\x00\x00\x00\x01u\x82\xf2\x01\xc2\xa0\x11H\x03\x06\xf9`%\x03\xa5\xa7\x7f\xb4\x16\xa0\x7f.\xe7\x1d\x90\x04\xba\x91\xc7\xaf\xa5\x91\xb9\xaf\xac\xe8\x00\x00\xaaU'
2019-12-02 08:52:35 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] result=b'u\x82\xf2\x01\xc2\xa0\x11H\x03\x06\xf9`%\x03\xa5\xa7\x7f\xb4\x16\xa0\x7f.\xe7\x1d\x90\x04\xba\x91\xc7\xaf\xa5\x91'
2019-12-02 08:52:35 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] decrypted result=''
2019-12-02 08:52:35 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.front_door_light fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 270, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/localtuya/switch.py", line 142, in update
    status = self._device.status(self._switch_id)
  File "/config/custom_components/localtuya/switch.py", line 98, in status
    self._cached_status = self.__get_status(switchid)
  File "/config/custom_components/localtuya/switch.py", line 75, in __get_status
    status = self._device.status()['dps'][switchid]
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 311, in status
    result = json.loads(result)
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The TuyaSmart iOS app says the firmware for the plugs is 1.0.1 and the bulbs is 1.0.9. I assume they are all hitting the 3.3 API. Anyone have tips on things I can try to get these other bulbs to work?

Posts: 2

Participants: 1

Read full topic

Viewing all 106722 articles
Browse latest View live


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