Problem with HA - Zoneminder automation: ValueError: invalid literal for int() with base 10: 'false'

I am trying to create automation to switch light on when Zoneminder starts Recording.

Something wrong with my automation script or with my HA setup (ver [2022.10.4])?

HA error log says:
Source: components/zoneminder/camera.py:60
First occurred: 1:43:57 PM (2 occurrences)
Last logged: 1:57:27 PM

Update for camera.tt13_etupiha fails
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 515, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 710, in async_device_update
raise exc
File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/zoneminder/camera.py”, line 60, in update
self._attr_is_recording = self._monitor.is_recording
File “/usr/local/lib/python3.10/site-packages/zoneminder/monitor.py”, line 169, in is_recording
return int(status) == STATE_ALARM
ValueError: invalid literal for int() with base 10: ‘false’

Automation script:

alias: ZM liikettä - Valot päälle
trigger:
  - platform: state
    entity_id:
      - camera.tt13_etupiha
    to: Recording
condition:
  - condition: and
    conditions:
      - condition: numeric_state
        entity_id: sun.sun
        value_template: "{{ state.attributes.elevation }}"
        below: 8
      - condition: device
        type: is_off
        device_id: 5b4b50905bdd998d2e4348e445122f69
        entity_id: switch.shellypro4pm_84cca87f565c_switch_0
        domain: switch
action:
  - type: turn_on
    device_id: 5b4b50905bdd998d2e4348e445122f69
    entity_id: switch.shellypro4pm_84cca87f565c_switch_0
    domain: switch
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: 5b4b50905bdd998d2e4348e445122f69
    entity_id: switch.shellypro4pm_84cca87f565c_switch_0
    domain: switch
mode: single

Additional info: if I disable the automation, status events are shown OK in logbook:

8:24:47 AM - 2 hours ago : TT13-etupiha changed to Idle
8:24:17 AM - 2 hours ago : TT13-etupiha changed to Recording

Anybody any idea what is wrong with my scenario?