Try this
[{"id":"81ac6f04f07ebdf7","type":"switch","z":"f80b6c338afd5483","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"btwn","v":"1","vt":"num","v2":"30","v2t":"num"},{"t":"btwn","v":"31","vt":"num","v2":"60","v2t":"num"},{"t":"eq","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":600,"y":620,"wires":[[],[],[],[]]},{"id":"9328452fa7922e11","type":"inject","z":"f80b6c338afd5483","name":"button press","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":150,"y":620,"wires":[["5c25363505d1361f"]]},{"id":"5c25363505d1361f","type":"api-current-state","z":"f80b6c338afd5483","name":"","server":"6b1110b5.183a4","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"$entity().attributes.brightness","valueType":"jsonata"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":360,"y":620,"wires":[["81ac6f04f07ebdf7"]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]