Emulated Hue device types & exposed domains

Hello,

I am using:

I have a “cover” exposed and i would like it to be presented as a switch. I can only open it once by sayng alexa turn on gate. But then it opens and alexa says its not responding, can’t close.

The config (partially)

host_ip: 192.168.1.142
listen_port: 80
expose_by_default: false
exposed_domains:
 - light
 - media_player
 - scene
 - lock
 - switch
 - cover
entities:
  switch.binary_power_switch_instance_3_switch_2:
   name: Storage Light
   hidden: false
  cover.tuin_voor_poort_cover:
    name: gate
    hidden: false

The api output (partially):

42	
state	
on	false
reachable	true
mode	"homeautomation"
name	"Storage Light"
uniqueid	"00:79:43:4a:0c:4e:83:75-b7"
manufacturername	"Home Assistant"
swversion	"123"
type	"On/Off light"
productname	"On/Off light"
modelid	"HASS321"
46	
state	
on	true
reachable	true
mode	"homeautomation"
colormode	"ct"
ct	153
bri	1
name	"gate"
uniqueid	"00:63:f9:a7:5f:12:b4:83-d6"
manufacturername	"Home Assistant"
swversion	"123"
type	"Color temperature light"
modelid	"HASS312"

@petro you seem to be an expert :slight_smile:

Anyone able to help here?

Could it be an option to “translate” a cover template to a switch and present that to alexa?

This problem is still exist in 2023 ?!..
No one had the chance to fix it?

Guys any help here will be good, Thankyou

@sender @Asafalfs You can expose a cover as a switch by using a template. This is defined in your configuration.yaml file. The documentation for a switch template is here.
I created one to test this on my system. This cover points to one of my roller shades. When the switch is turned on, my roller shade goes up, when the switch is turned off, my roller shade goes down. Just expose this switch in your emulated hue configuration and reference it from Alexa.
Here is the yaml.

switch:
  - platform: template
    switches:
      my_cover_switch:
        value_template: "{{is_state('cover.guest_room_blind', 'open') }}"
        turn_on:
          action: cover.open_cover
          target:
            entity_id: cover.guest_room_blind
        turn_off:
          action: cover.close_cover
          target:
            entity_id: cover.guest_room_blind