For changing the scale of a variable, I found this resource. The first answer contains a nice formula.
So in the template editor this seems to work (0 transforms to 30, that’s what you wanted):
{% set brightness = 0 %}
{{ ((0.7*(brightness-100))+100) | int }}
In a template light, you can use this in the ‘set_level’ part:
set_level:
- service: light.turn_on
data_template:
entity_id: light.kitchenlight
brightness: "{{ ((0.7*(brightness-100))+100) | int }}"
I’m not sure if you need to change the level_template as well. It’s early
If you need more help, just let me know.