Boolean configuration question

Tried to use Boolean entities in ESPHome add-on, but encountered problems at the start. See my initial code below (validated as OK in Best YAML Validator Online).
It refused to install on a ESP8266 NODEMCU (called: mcutest) because of errors (otherwise mcutest is working fine on ESPHome-code).
My Home Assistant config.yaml file includes the autoconfig component, so Boolean entities should be recognized and be usable in Home Assistant & ESPHome, is my perception.
Please advise a remidy.

ESPHome code-snippet for the boolean, using a button1 state

input_boolean:
flag_button1:
initial: ‘off’
automation:

  • alias: flag_button1_update
    trigger:
    platform: state
    entity-id: button1
    from: ‘off’
    to: ‘on’
    action:
    - turn_on:
    target: input_boolean.flag_button1

Error information when installing the mcutest config-file:

INFO ESPHome 2023.12.9
INFO Reading configuration /config/esphome/mcutest.yaml…
INFO Detected timezone ‘Europe/Amsterdam’
Failed config

input_boolean: [source :168]

Component not found: input_boolean.
flag_button1:
initial: off
automation: [source :171]

Component not found: automation.

  • alias: flag_button1_update
    trigger:
    platform: state
    entity-id: button1
    from: off
    to: on
    action:
    - turn_on:
    target: input_boolean.flag_button1

Note: the bullit in front of alias are not in my config (they were automatically inserted while posting here; do not know why)

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Also tried the code-example in Input Boolean - Home Assistant
But my problem using it in the ESPHome add-on remained the same as before; the input-boolean code snippet is not accepted/regarded as valid YAML code in ESPHome. Please advise.

# Example configuration.yaml entry
input_boolean:
  notify_home:
    name: Notify when someone arrives home
    icon: mdi:car
```from

Home assistant config is not valid for valid for esphome. All the ESPHome config is listed here:

What problem are you trying to solve?

Note: I am not asking about your chosen method to accomplish this. https://xyproblem.info/