KaufHA / PLF10

Files for the PLF10 Power Monitoring Smart Plug.
26 stars 16 forks source link

[forced_hash] is an invalid option for [switch.gpio]. Please check the indentation. #4

Closed AhrBee closed 2 years ago

AhrBee commented 2 years ago

In wanting to refine the calibration of the PLF10 plug device, I pulled the kauf-plug.yaml file , then adapted the volts, current, and watt calibration measurements. When attempting to install, I get the failure [forced_hash] is an invalid option for [switch.gpio]. Please check the indentation.

Pulled a fresh copy the kauf-plug.yaml file this time changing ONLY the name and friendly_name values. Saved, attempted to install, Again, I get the failure [forced_hash] is an invalid option for [switch.gpio]. Please check the indentation.

Reverted to the 'simple' installation configuration in the PLF10 README and was able to install, and the device appears in Home Assistant/ESPHome/webview.

The file name in all cases above was the same as the changed name: plug-2 item, and not the default kauf-plug

This issue has appeared ever since the forced hashes appeared, regardless of ESPHome version. Current ESPHome version here is 2.2.5

I would like to be able to refine the calibration from the stock settings, but using the full configuration does not seem to compile (install).

What's the obvious thing I am missing here?


Environment:

On Raspberry Pi 3 Model B+ (aarch64)

Home Assistant/ESPHome details:

version core-2022.2.9
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.92-v8+
arch aarch64
timezone America/Denver
Home Assistant Supervisor host_os | Debian GNU/Linux 11 (bullseye) -- | -- update_channel | stable supervisor_version | supervisor-2022.01.1 docker_version | 20.10.12 disk_total | 58.4 GB disk_used | 16.4 GB healthy | true supported | true supervisor_api | ok version_api | ok installed_addons | ESPHome (2022.2.5), File editor (5.3.3), Samba Backup (5.0.0)
KaufHA commented 2 years ago

The forced_hash option requires our custom external components, so for whatever reason you don't have those included properly. If you are editing the yaml file, you are probably fine to just delete all the forced_hash options. To get them to work properly, I'd try deleting the .esphome/external_components and .esphome/packages folders within the esphome config directory. Maybe forcing ESPHome to redownload them will cause them to be correct. If that doesn't work, let me know and we can dig deeper.

Now that you mention it, I should include a way to edit the calibration while still using my packages. Maybe I'll add some substitutions you can edit to calibrate.

AhrBee commented 2 years ago

Deleting .esphome/external_components and .esphome/packages folders within the esphome config directory did the trick. Probably some cruft left over from earlier versions. This fixed the same issue I was having with the kauf-rgbww-bulb.

Thanks!