AdamKGoddard / XiaomiIR_ESPHome

Custom ESPHome Firmware for the Xiaomi IR Controller
GNU General Public License v3.0
21 stars 7 forks source link

Compiling sample yaml gives traceback error in ESPHome #7

Closed henkvdt closed 1 year ago

henkvdt commented 1 year ago

When I try to compile firmware using the sample yaml file in the repository I get the following error:

Traceback (most recent call last): File "/usr/local/bin/esphome", line 33, in <module> sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')()) File "/esphome/esphome/__main__.py", line 960, in main return run_esphome(sys.argv) File "/esphome/esphome/__main__.py", line 947, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) File "/esphome/esphome/__main__.py", line 355, in command_compile exit_code = write_cpp(config) File "/esphome/esphome/__main__.py", line 176, in write_cpp generate_cpp_contents(config) File "/esphome/esphome/__main__.py", line 188, in generate_cpp_contents CORE.flush_tasks() File "/esphome/esphome/core/__init__.py", line 616, in flush_tasks self.event_loop.flush_tasks() File "/esphome/esphome/coroutine.py", line 246, in flush_tasks next(task.iterator) File "/esphome/esphome/core/config.py", line 317, in _add_platformio_options cg.add_platformio_option(key, val) File "/esphome/esphome/cpp_generator.py", line 621, in add_platformio_option CORE.add_platformio_option(key, value) File "/esphome/esphome/core/__init__.py", line 710, in add_platformio_option assert isinstance(value, list) AssertionError

ESPHome version: v2022.12.1

Any idea on how to fix this?

calania commented 1 year ago

Did you ever manage to fix this? I am having the same issue

henkvdt commented 1 year ago

Fixed it using the configuration from this site: https://homeassistantbrasil.com.br/t/flashing-xiaomi-ir-com-esphome/7174

AdamKGoddard commented 1 year ago

Hey, sorry I had some time today to go through the issues and get this compiling again. Thanks for your patience.

calania commented 1 year ago

Thanks! I At first I however had problems compiling. When I downloaded the new files I got the following error.

`Failed config

esphome: None name: xiaomi-ir

[friendly_name] is an invalid option for [esphome]. Please check the indentation. friendly_name: Xiaomi-IR platformio_options: extra_scripts:

After removing all references to friendly_name and replacing it with them with Xiaomi-IR it fixed it for me and is now compiling

calania commented 1 year ago

I uploaded the code now and the only moddifications I made except for the removing the friendly name was add this part last to my code

`climate:

Looking at the web portal (ip:80) it seems like the receiver is always turned on and my board does get hot. I thought the board getting hot issue had been fixed?

AdamKGoddard commented 1 year ago

Try remote_transmitter: ** inverted: True

then test your IR commands

calania commented 1 year ago

Awesome! Got it working perfectly now after inverting the led.

AdamKGoddard commented 1 year ago

Sorry, was my leftover when testing the new code. I'm going to close the issue and I'll try to test the code every new major version of ESPHome/HA.