Script uses exactly those topics in roller mode
. What is the problem?
Sorry to bother with a beginnerās question.
I added the python_script to configuration.yaml
GNU nano 4.6 configuration.yaml
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#Shelly component
python_script:
I added the minimal to the automation.yaml as follows:
GNU nano 4.6 automations.yaml
automation:
- id: shellies_announce
alias: 'Shellies Announce'
trigger:
- platform: homeassistant
event: start
action:
service: mqtt.publish
data:
topic: shellies/command
payload: announce
- id: 'shellies_discovery'
alias: 'Shellies Discovery'
trigger:
- platform: mqtt
topic: shellies/announce
action:
service: python_script.shellies_discovery
data_template:
id: '{{ trigger.payload_json.id }}'
mac: '{{ trigger.payload_json.mac }}'
fw_ver: '{{ trigger.payload_json.fw_ver }}'
I must be doing something wrong, for this gives me errors in the log:
Invalid config for [automation]: [automation] is an invalid option for [automation]. Check: automation->automation. (See /config/configuration.yaml, line 13).
12:46 PM components/hassio/__init__.py (ERROR) - message first occurred at 12:45 PM and shows up 2 times
Error loading /config/configuration.yaml: expected '<document start>', but found '<block sequence start>' in "/config/automations.yaml", line 2, column 3
12:46 PM components/hassio/__init__.py (ERROR)
expected '<document start>', but found '<block sequence start>' in "/config/automations.yaml", line 2, column 3
12:46 PM util/yaml/loader.py (ERROR)
Surely this is because I donāt know whatās going on, but I could use a step by step here.
Remove automation:
from automations.yaml
file. Learn how to use yaml
Well, you have no idea on how much I need to learn before I get comfortable.
Is there a step by step on how to configure?
The overview now shows indeed shellies discovery and shellies announce, but am totally lost on how to get my H&T showing up as a device.
Both of them connect to the MQTT Mosquitto broker, but thatās all. Iāve been reading through the comments above, and I still donāt know what to do next. In any case, I canāt get the devices to show up automatically.
New version: 0.14.1
Changelog:
- change ID split method
New version: 0.15.0
Changelog:
- add support for external temperature sensors (Shelly1 and Shelly1PM)
- add debugging logs
- better errors handling
Configuration example for external sensors:
- id: 'shellies_discovery'
alias: 'Shellies Discovery'
trigger:
- platform: mqtt
topic: shellies/announce
action:
service: python_script.shellies_discovery
data_template:
id: '{{ trigger.payload_json.id }}'
mac: '{{ trigger.payload_json.mac }}'
fw_ver: '{{ trigger.payload_json.fw_ver }}'
shelly1-001122-ext-0: 'temperature'
shelly1-001122-ext-1: 'temperature'
shelly1-001122-ext-2: 'temperature'
If HA and Shelly H&T are correct configured to connect to MQTT broker and automations (Shellies Announce and Shellies Discovery) are enabled You have to push the button on H&T. After that Shellies Discovery script will do the rest and entities will show up in Configuration -> Integrations -> MQTT.
I knew it would be a simple thing to doā¦
Thanks a lot!
Is it possible that the offset of the Shelly H&T is not sent over through the script?
My shelly needs to be offset for both temp and humidity. And on the IP of the shelly the humidity is spot on with the offset, but the output to the HA is not quite correct.
Is there a way to work around this?
Script has no effect on the values that device sends.
Ok, thanks for the reply.
Just fyi, on the Shelly H&T there is an offset (both humidity and temperature) you need to ācalibrateā in order that the devices have the correct value. That offset is clearly not pulled into the HA.
Looking at this thread, it appears that this is not unusual. If you look at the IP-of-shelly/status then you get the ācorrected valuesā. If you look at HA you get the ābaseā values. Would you think that it could pull the ācorrected valuesā or would that be to complex to get into the script?
No. Script only sends to broker config
topics for MQTT discovery. Nothing more. If device sends incorrect values via MQTT those values will be show in HA. Check what H&T sends via MQTT. If values are incorrect ask about that Shelly support.
Question about Shelly 1ās and the script.
I have a Shelly 1 hooked up to my garage door opener that I want to use in some Node-Red jobs. However, the script found it and labelled it as a switch. Is there a way short of going the manual route to have it be a cover instead of a switch?
Thanks.
There's a bug in the script:
lines 382 and 383 should have:
position_topic = f"{state_topic}/pos"
set_position_topic = f"{state_topic}/command/pos"
Can someone correct this?
New version: 0.15.1
Changelog:
- fix topics in
roller_mode
- add
total
andtotal_returned
sensors for ShellyEM
New version: 0.15.2
Changelog:
- fix units for
total
andtotal_returned
sensors (ShellyEM)
Thanks. You can suggest this on the Shelly group on FB
Iām facing the following situation:
- I need to put in floorplan the IDs of the entities in the svg file
- if Iām changing the Shelly units, I will need to edit again the svg file
Would it be possible to include in your script the ability to change the entity name, just as you change the type (light, switch, fan) ?