Plugin issue with HA version 2023.06
Closed this issue · 7 comments
Hi all,
as you probably know that the latest HA has introduced diff way of introducing sensors and command line.
I'm just wondering if I can please get some guide on this?
I've tried following the syntax for command line within configuration.yaml to no avail.
and if I understand this right, we can no longer use sensors.yaml? so all of them needs to go back to configuration.yaml?
Only one sensor has to be changed here. At least in my very modded version:
command_line:
- switch:
name: e208_clim
unique_id: e208_clim
command_on: curl -s "http://192.168.181.42:5000/preconditioning/VIM/1"
command_off: curl -s "http://192.168.181.42:5000/preconditioning/VIM/0"
Hello,
I updated the documentation:
https://github.com/Flodu31/HomeAssistant-PeugeotIntegration/blob/main/README.md
Florent
Many thanks @dreimer1986 & @Flodu31 that worked! However, this latest HA version also complaining about the implementation of sensors --> referring sensor.yaml from configuration.yaml
Are we supposed to move all of these back to configuration.yaml and use the new syntax too?
yes true, everything that use command_line must be move to configuration.yaml or a a dedicated file that you import in your configuration.yaml.
Quick example:
- sensor:
name: rest_token
scan_interval: 3600 # every 1 hour
command: 'your command'
Thanks, I will give this a go, but how do I address rest platform under sensor? and how do I address template platform too?
I'm not sure how to convert these....because I've moved them to configuration.yaml and it is still complaining.
sensor:
- platform: rest
name: peugeot_e2008
resource: http://192.168.2.28:5000/get_vehicleinfo/XXXXXXXXXXXXXXXXX?from_cache=1
scan_interval: 60
timeout: 30
value_template: 'OK'
json_attributes:- energy
- timed_odometer
- battery
and this
- platform: template
sensors:
e2008_battery_voltage:
friendly_name: "Battery Voltage"
unit_of_measurement: "V"
value_template: '{{ states.sensor.peugeot_e2008.attributes["battery"]["voltage"] * 4 }}'
Thanks
These one should be ok. only command_line is impacted.