wez / govee2mqtt

Govee2MQTT: Connect Govee lights and devices to Home Assistant
MIT License
486 stars 32 forks source link

Use Automation to Set Lights Colors/Effect/Scene/Tap2Run #301

Open mfranzel opened 1 week ago

mfranzel commented 1 week ago

Govee Device SKU

Various

Govee2MQTT Version

2024.07.13-82ddc6e9

Describe the issue

When I make tap-to-run scenes or add a scene to the devices, I press the button to clear cache as well as reloading the MQTT plugin, but the scenes never show up.

I really just want to have an automation that turns the lights ON and either sets them to a specific color I choose, to a specific scene, or a specific effect. Is this possible?

Startup Diagnostics

[2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=false ble_only=true [2024-10-29T16:18:06 INFO govee::commands::serve] Quirk { sku: "H5179", icon: "mdi:thermometer", supports_rgb: false, supports_brightness: false, color_temp_range: None, avoid_platform_api: false, ble_only: false, lan_api_capable: false, device_type: Thermometer, platform_temperature_sensor_units: Some(Farenheit), platform_humidity_sensor_units: Some(RelativePercent), iot_api_supported: false, show_as_preset_buttons: None } [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Front Lighting w Trees (40:3F:60:74:F4:98:DB:4A H5083) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.socket. supports_rgb=false supports_brightness=false [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=None segment_rgb=None [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Telecom Dehumidifier (15:3B:60:74:F4:1C:53:FA H7151) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.dehumidifier. supports_rgb=false supports_brightness=false [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=None segment_rgb=None [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Front Lighting by Gate (1A:9E:60:74:F4:9B:56:62 H5083) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.socket. supports_rgb=false supports_brightness=false [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=None segment_rgb=None [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Garage Refrigerator (5C:44:18:1F:6C:72:31:2B H5179) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.thermometer. supports_rgb=false supports_brightness=false [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=None segment_rgb=None [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=false ble_only=true [2024-10-29T16:18:06 INFO govee::commands::serve] Quirk { sku: "H5179", icon: "mdi:thermometer", supports_rgb: false, supports_brightness: false, color_temp_range: None, avoid_platform_api: false, ble_only: false, lan_api_capable: false, device_type: Thermometer, platform_temperature_sensor_units: Some(Farenheit), platform_humidity_sensor_units: Some(RelativePercent), iot_api_supported: false, show_as_preset_buttons: None } [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Left Ground Lights (90:19:C7:38:30:33:07:42 H7050) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] Quirk { sku: "H7050", icon: "mdi:light-bulb", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: false, ble_only: false, lan_api_capable: true, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-10-29T16:18:06 WARN govee::commands::serve] This device should be available via the LAN API, but didn't respond to probing yet. Possible causes: [2024-10-29T16:18:06 WARN govee::commands::serve] 1) LAN API needs to be enabled in the Govee Home App. [2024-10-29T16:18:06 WARN govee::commands::serve] 2) The device is offline. [2024-10-29T16:18:06 WARN govee::commands::serve] 3) A network configuration issue is preventing communication. [2024-10-29T16:18:06 WARN govee::commands::serve] 4) The device needs a firmware update before it can enable LAN API. [2024-10-29T16:18:06 WARN govee::commands::serve] 5) The hardware version of the device is too old to enable the LAN API. [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] RGBICW LED Strip Light (0D:87:CE:38:32:34:11:28 H61BE) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..20) [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Flood Lights Ficus (16:82:D7:39:32:33:6B:46 H7062) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..2) [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] Quirk { sku: "H7062", icon: "mdi:light-flood-down", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: false, ble_only: false, lan_api_capable: true, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-10-29T16:18:06 WARN govee::commands::serve] This device should be available via the LAN API, but didn't respond to probing yet. Possible causes: [2024-10-29T16:18:06 WARN govee::commands::serve] 1) LAN API needs to be enabled in the Govee Home App. [2024-10-29T16:18:06 WARN govee::commands::serve] 2) The device is offline. [2024-10-29T16:18:06 WARN govee::commands::serve] 3) A network configuration issue is preventing communication. [2024-10-29T16:18:06 WARN govee::commands::serve] 4) The device needs a firmware update before it can enable LAN API. [2024-10-29T16:18:06 WARN govee::commands::serve] 5) The hardware version of the device is too old to enable the LAN API. [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Front Lights (C9:B3:D7:35:33:33:73:74 H705C) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..18) [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Front Yard Floods (66:D1:C9:35:33:33:12:31 H7060) [2024-10-29T16:18:06 INFO govee::commands::serve] LAN API: ip=10.0.185.80 [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..4) [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] Quirk { sku: "H7060", icon: "mdi:light-flood-down", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: false, ble_only: false, lan_api_capable: true, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Right Front Ground (EE:2A:C4:38:32:31:40:0E H7050) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] Quirk { sku: "H7050", icon: "mdi:light-bulb", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: false, ble_only: false, lan_api_capable: true, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-10-29T16:18:06 WARN govee::commands::serve] This device should be available via the LAN API, but didn't respond to probing yet. Possible causes: [2024-10-29T16:18:06 WARN govee::commands::serve] 1) LAN API needs to be enabled in the Govee Home App. [2024-10-29T16:18:06 WARN govee::commands::serve] 2) The device is offline. [2024-10-29T16:18:06 WARN govee::commands::serve] 3) A network configuration issue is preventing communication. [2024-10-29T16:18:06 WARN govee::commands::serve] 4) The device needs a firmware update before it can enable LAN API. [2024-10-29T16:18:06 WARN govee::commands::serve] 5) The hardware version of the device is too old to enable the LAN API. [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Backyard Fence String (29:38:D6:BF:DE:25:97:2D H70C2) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..10) [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Front Yard Fountain (E5:53:D9:35:33:33:37:7B H7066) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..4) [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::commands::serve] Backyard String Lights (35:20:C7:30:38:35:3C:5F H7021) [2024-10-29T16:18:06 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-10-29T16:18:06 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..15) [2024-10-29T16:18:06 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-10-29T16:18:06 INFO govee::commands::serve] Quirk { sku: "H7021", icon: "mdi:string-lights", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: false, ble_only: false, lan_api_capable: true, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-10-29T16:18:06 WARN govee::commands::serve] This device should be available via the LAN API, but didn't respond to probing yet. Possible causes: [2024-10-29T16:18:06 WARN govee::commands::serve] 1) LAN API needs to be enabled in the Govee Home App. [2024-10-29T16:18:06 WARN govee::commands::serve] 2) The device is offline. [2024-10-29T16:18:06 WARN govee::commands::serve] 3) A network configuration issue is preventing communication. [2024-10-29T16:18:06 WARN govee::commands::serve] 4) The device needs a firmware update before it can enable LAN API. [2024-10-29T16:18:06 WARN govee::commands::serve] 5) The hardware version of the device is too old to enable the LAN API. [2024-10-29T16:18:06 INFO govee::commands::serve] [2024-10-29T16:18:06 INFO govee::service::http] http server addr is 0.0.0.0:8056

Additional Logs

No response

Home Assistant Logs

No response

Anything else?

No response

Rustymage commented 4 days ago

I use HASS Calendar, scripts and triggers for this.

alias: Calendar Lighting
description: ""
triggers:
  - trigger: time
    at: "23:00:00"
    id: time
  - trigger: numeric_state
    entity_id:
      - sun.sun
    attribute: elevation
    below: -4
    id: sunset
actions:
  - target:
      entity_id: calendar.hass
    data:
      start_date_time: "{{ today_at() }}"
      duration:
        hours: 24
    response_variable: calendar
    action: calendar.get_events
  - choose:
      - conditions:
          - condition: trigger
            id:
              - sunset
            enabled: true
          - condition: template
            value_template: |-
              {{
                calendar['calendar.hass'].events
                  | map(attribute='summary')
                  | select('search', 'Halloween')
                  | list
                  | count > 0
              }}
        sequence:
          - action: script.turn_on
            target:
              entity_id: script.neon_halloween_b
            data: {}
        alias: Halloween
      - conditions:
          - condition: template
            value_template: |-
              {{
                calendar['calendar.hass'].events
                  | map(attribute='summary')
                  | select('search', 'Birthday')
                  | list
                  | count > 0
              }}
          - condition: trigger
            id:
              - sunset
            enabled: true
        sequence:
          - action: script.turn_on
            target:
              entity_id: script.neon_birthday
            data: {}
        alias: Birthday
      - conditions:
          - condition: trigger
            id:
              - time
        sequence:
          - action: script.turn_on
            target:
              entity_id: script.neon_off
            data: {}
        alias: Neon Off
    default:
      - action: script.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: script.neon_dreamlike_a
mode: single

A script looks as follows:

alias: Neon - Dreamlike-A
sequence:
  - action: light.turn_on
    target:
      entity_id:
        - light.outdoor_neon_light
    data:
      effect: Dreamlike-A
      brightness_pct: 100
description: ""
icon: mdi:led-strip-variant

I have the H61A8 rope lights.