Light turned on: brightness always 100%

I would like to set brightness to 100% when a light is turned on with the light switch. So light had no power and when I turn the lightswitch the light switch s on but in the latest brightness. I would like it to set this to 100%.

I thought that with trigger state from off to on from light.pc_room. The trigger works. But then I want to set this same light to brightness 100%. How can I do this. So the light is the trigger and involved in the action.

Take a look at the common light docs.
Thereā€™s an example configuration.yaml entry.

I did see that doc. And will look to it again. Problem that I have is that the light isnā€™t turned on by home Assistant but from a hardware switch on the wall.

What are the states of your light if itā€™s on/off by the switch? Check in Dev Tools/states.
If it goes to ā€˜onā€™ when you turn it on by the switch, something like this could work.

automation:
  - alias: Set light brightness
    trigger:
      - platform: state
        entity_id: light.your_light
        to: 'on'
    action:
      - service: light.turn_on
        data:
          entity_id: light.your_light
          brightness: 255