Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Hook Media Player with IKEA E1743 #7

Closed
ShagoY opened this issue Mar 14, 2021 · 6 comments
Closed

[BUG] Hook Media Player with IKEA E1743 #7

ShagoY opened this issue Mar 14, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@ShagoY
Copy link

ShagoY commented Mar 14, 2021

Bug Details

  • Blueprint name: Controller - IKEA E1743 On/Off Switch & Dimmer + Hook Media Player
  • Home Assistant Core Version: 2021.3.4
  • Home Assistant Installation Type: Home Assistant OS

Description
When I perform an action with the mediaplayer hook to activate, I get an error in the logs and the action is not performed.
But I have a persistent notification when the action is taken.

To Reproduce

alias: Hook - Media Player - Ikea Switch
description: ''
use_blueprint:
  path: EPMatt/media_player.yaml
  input:
    controller_entity: sensor.tradfri_switch_1_action
    controller_model: IKEA E1743 On/Off Switch
    media_player: media_player.lg_webos_smart_tv
alias: Controller - IKEA E1743 On/Off Switch & Dimmer
description: ''
use_blueprint:
  path: EPMatt/ikea_e1743.yaml
  input:
    integration: Zigbee2MQTT
    zigbee2mqtt_remote: sensor.tradfri_switch_1_action
    action_up_short:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Up button - short press
    helper_last_loop_event_input: input_text.tradfri_switch
    action_up_double:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Up button - double press
    action_up_long:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Up button - long press
    action_up_release:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Up button - release after long press
    action_down_short:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Down button - short press
    action_down_double:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Down button - double press
    action_down_long:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Down button - long press
    action_down_release:
      - service: notify.persistent_notification
        data:
          message: Ikea switch - Down button - release after long press
    button_up_double_press: true
    button_down_double_press: true

Additional context

ERROR (MainThread) [homeassistant.components.automation.hook_media_player_ikea_switch] Error rendering variables: UndefinedError: 'dict object' has no attribute ''
@ShagoY ShagoY added the bug Something isn't working label Mar 14, 2021
@ShagoY
Copy link
Author

ShagoY commented Mar 14, 2021

Note: The hook works correctly on my e1744 and e1812 controllers.

@EPMatt
Copy link
Owner

EPMatt commented Mar 14, 2021

Hi @ShagoY,

thank you for reporting. The issue should be fixed now.

I was using an old name for the E1743 in the select option in both the Light and Media Player Hooks. A refactor accidentally unveiled the problem.

Please let me know if the issue is fixed. :)

@ShagoY
Copy link
Author

ShagoY commented Mar 14, 2021

Being fairly new to HA, could you tell me what is the best method to update a blueprint?

At the moment, I delete the blueprint/automation and recreate them.

@EPMatt
Copy link
Owner

EPMatt commented Mar 14, 2021

Currently, to update a blueprint you can proceed as follows:

  1. Delete the old blueprint;
  2. Import the updated blueprint via the UI (Configuration->Blueprints->Import Blueprint);
  3. Reload automations (Configuration->Server Controls->Reload automations or via the quick bar).

No need to delete automations, since as soon as you complete step 3 they get rebuilt with the updated blueprint. :)

It looks like in the future there will be a simpler way to update blueprints in HA, but I don't know at what point is the development of such feature.

@ShagoY
Copy link
Author

ShagoY commented Mar 14, 2021

Ok no error message and it's work :)

Thank !

@ShagoY ShagoY closed this as completed Mar 14, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

Hi there,

🔒 This issue has been automatically locked since there has not been any recent activity after it was closed.
Please open a new ticket for related bugs.

Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants