nielsfaber / alarmo

Easy to use alarm system integration for Home Assistant
1.36k stars 120 forks source link

The schema is not an entity service schema #1020

Closed tomlut closed 4 weeks ago

tomlut commented 2 months ago

Checklist

Alarmo Version

v1.10.4

HA Version

2024.9.0b0

Bug description

After a restart on the latest beta version I receive the following error:

Logger: homeassistant.components.alarm_control_panel
Source: helpers/entity_platform.py:361
integration: Alarm Control Panel (documentation, issues)
First occurred: 18:04:49 (1 occurrences)
Last logged: 18:04:49

Error while setting up alarmo platform for alarm_control_panel
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/alarmo/alarm_control_panel.py", line 97, in async_setup_entry
    platform.async_register_entity_service(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 997, in async_register_entity_service
    service.async_register_entity_service(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1271, in async_register_entity_service
    raise HomeAssistantError("The schema is not an entity service schema")
homeassistant.exceptions.HomeAssistantError: The schema is not an entity service schema

Steps to reproduce

Install HA core 2024.9.0b0

Relevant log output

No response

Thrasher2020 commented 2 months ago

I also have the same issue so it is not a one off. I have reverted to 2024.8.3 for now - until this is resolved.

drewancil commented 2 months ago

Yea, this is appearing on other custom integrations. Alarmo for example.

tomlut commented 2 months ago

Alarmo for example.

What?

You are commenting on the alarmo issue.

So it appears that this affects all alarmo.xxx services except enable/disable user.

arenasa70 commented 2 months ago

Yes, all alarmo.xxx action calls disappeared, now you have to call the actions like this:

action: alarm_control_panel.alarm_disarm
target:
  entity_id: alarm_control_panel.alarmo
data: {}
tomlut commented 2 months ago

Yeah I've already updated my scripts but the documentation for the manual alarm panel is a bit lacking and I have not had a chance to test it yet. There's no info on any of the options, e.g. is skip_delay supported by the manual alarm control panel?


alarm_arm:
  sequence:
  # - service: alarmo.arm
  #   data:
  #     entity_id: alarm_control_panel.alarmo
  #     code: !secret alarm_code
  #     mode: away
  #     skip_delay: false
  - service: alarm_control_panel.alarm_arm_away
    data:
      entity_id: alarm_control_panel.alarmo
      code: !secret alarm_code
      mode: away
      skip_delay: false
roblamoreaux commented 2 months ago

From looking at my log files alarmo is failing to start so not much will work.

arenasa70 commented 2 months ago

Mine is working, I can set states using the mushroom card for alarm panel. Those changes are reflected on the custom alarmo card, but I can't control it from there.

tomlut commented 2 months ago

You can also still go to the Alarmo UI and make configuration changes. It's just the alarmo services that have not been loaded. It's not clear yet whether triggering an alarm will work but I expect it will.

nielsfaber commented 2 months ago

I am currently on holidays so I cannot look into this. It seems the 2024.9 release of HA comes with a breaking change, I advise not to upgrade until this issue is resolved.

tomlut commented 2 months ago

Everything still works except for the alarmo services which can be replaced with alarm_control_panel services as a workaround.

andreasbrett commented 2 months ago

The latest 2024.9.0 beta (b3) has reverted making this a breaking change. It is just a warning now and Alarmo services are created again. Alarmo users can update to 2024.9.

tomlut commented 2 months ago

In particular: https://developers.home-assistant.io/blog/2024/08/27/entity-service-schema-validation/

Thrasher2020 commented 2 months ago

Thanks for letting us know 👍

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

tomlut commented 1 month ago

Still an issue

Spegeli commented 1 month ago

This "error" comes from this part:

    # Register services
    platform = entity_platform.current_platform.get()
    platform.async_register_entity_service(
        const.SERVICE_ARM,
        const.SERVICE_ARM_SCHEMA,
        "async_service_arm_handler",
    )
    platform.async_register_entity_service(
        const.SERVICE_DISARM,
        const.SERVICE_DISARM_SCHEMA,
        "async_service_disarm_handler",
    )

because the new HA Schema use ACTION instead of SERVICE.

Funny that in in the HA DEV Docs they still use the old Schema xD https://developers.home-assistant.io/docs/dev_101_services?_highlight=platform.async_register_entity#entity-service-actions

nielsfaber commented 4 weeks ago

Sorry for the delay, this is now fixed (https://github.com/nielsfaber/alarmo/commit/fdbbb35bffccfef9a8d550889c89fd2f7c5d0593) and will be released soon.

smarthomefamilyverrips commented 4 weeks ago

@nielsfaber will the latest 1.10.5 update work with HA 2024.9.X?