Entendi, e você conseguiu adicionar a central da Intelbras aí?
Sim. Os traços verdes são portas fechadas e vermelho portas abertas. Na lateral Adicionei um botão para ativar/ desativar
Consegue me passar como você integrou?
Da uma olhada aí em cima, tem um vídeo no YouTube vem explicativo
Bom, resolvi um problema, agora cai em outro kkkk, eu gostaria de que quando eu aperta no ícone, aconteça a ação direta, mas. Vez disso abre a tela de interruptor, como na foto, tem como resolver?
Da uma olhada aqui.
No meio do tópico tem um post com as instruções e mais para o final tem o código atualizado.
Posta como ficou o código do interruptor
type: picture-elements
image: /local/imagens/3d/kleber/casa_off.png
style:
top: 30%
left: 30%
elements:
- type: image
entity: switch.cozinha_interruptor_4
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/corredor fundos on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.cozinha_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/cozinha on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.cozinha_interruptor_1
style:
left: 65%
top: 38%
width: 6%
tap_action:
action: toggle - type: image
entity: switch.cozinha_interruptor_3
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/hall qto on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.cozinha_interruptor_3
style:
left: 55%
top: 35%
width: 9%
tap_action:
action: toggle - type: image
entity: light.quarto_meninas
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/qto meninas on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: light.quarto_meninas
style:
left: 40%
top: 50%
width: 9%
tap_action:
action: toggle - type: image
entity: light.quarto_casal
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/qto casal on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.cozinha_interruptor_4
style:
left: 52%
top: 70%
width: 9%
tap_action:
action: toggle - type: image
entity: switch.sala_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/sala on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.sala_interruptor_1
style:
left: 69%
top: 69%
width: 15%
tap_action:
action: toggle - type: image
entity: switch.sala_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/escritorio kleber on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.sala_interruptor_2
style:
left: 77%
top: 47%
width: 15%
tap_action:
action: toggle - type: image
entity: switch.sala_interruptor_3
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/hall entrada on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.qto_casal_cama_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/frente on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.lavanderia_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/lavanderia on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.lavanderia_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/muro on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.escritorio_katia_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/escritorio katia on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
image: /local/imagens/3d/kleber/transparente.png
style:
top: 50%
left: 50%
width: 100% - type: state-icon
entity: switch.cozinha_interruptor_4
style:
left: 65%
top: 10%
width: 9%
tap_action:
action: toggle
Posta o código na formatação correta, dessa maneira não tem como ver a indentação
Estou no celular e não consigo ver direito.
Mas parece que vc criou 2 “cards” para cada entidade, um state e outro image.
Aqui eu uso só o image
Bloco de Citação
type: picture-elements
image: /local/imagens/3d/kleber/casa_off.png
style:
top: 30%
left: 30%
elements:
- type: image
entity: switch.cozinha_interruptor_4
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/corredor fundos on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.cozinha_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/cozinha on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.cozinha_interruptor_1
style:
left: 65%
top: 38%
width: 6%
tap_action:
action: toggle - type: image
entity: switch.cozinha_interruptor_3
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/hall qto on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.cozinha_interruptor_3
style:
left: 55%
top: 35%
width: 9%
tap_action:
action: toggle - type: image
entity: light.quarto_meninas
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/qto meninas on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: light.quarto_meninas
style:
left: 40%
top: 50%
width: 9%
tap_action:
action: toggle - type: image
entity: light.quarto_casal
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/qto casal on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.cozinha_interruptor_4
style:
left: 52%
top: 70%
width: 9%
tap_action:
action: toggle - type: image
entity: switch.sala_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/sala on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.sala_interruptor_1
style:
left: 69%
top: 69%
width: 15%
tap_action:
action: toggle - type: image
entity: switch.sala_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/escritorio kleber on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: state-icon
entity: switch.sala_interruptor_2
style:
left: 77%
top: 47%
width: 15%
tap_action:
action: toggle - type: image
entity: switch.sala_interruptor_3
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/hall entrada on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.qto_casal_cama_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/frente on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.lavanderia_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/lavanderia on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.lavanderia_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/muro on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
entity: switch.escritorio_katia_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/escritorio katia on.png
‘off’: /local/imagens/3d/kleber/transparente.png - type: image
image: /local/imagens/3d/kleber/transparente.png
style:
top: 50%
left: 50%
width: 100% - type: state-icon
entity: switch.cozinha_interruptor_4
style:
left: 65%
top: 10%
width: 9%
tap_action:
action: toggle
Atualizei.muita coisa já, mas ainda não consigo fazer que quando eu clicar no ícone da lâmpada ela execute a ação sem aparecer a tela do interruptor…
type: picture-elements
image: /local/imagens/3d/kleber/casa_off.png
style:
top: 30%
left: 30%
elements:
- type: image
entity: switch.cozinha_interruptor_4
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/corredor fundos on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.cozinha_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/cozinha on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.cozinha_interruptor_3
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/hall qto on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: light.quarto_meninas
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/qto meninas on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: light.quarto_casal
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/qto casal on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.sala_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/sala on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.sala_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/escritorio kleber on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.sala_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/hall entrada on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.qto_casal_cama_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/frente on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.lavanderia_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/lavanderia on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.lavanderia_interruptor_2
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/muro on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
entity: switch.escritorio_katia_interruptor_1
style:
top: 50%
left: 50%
width: 100%
state_image:
‘on’: /local/imagens/3d/kleber/escritorio katia on.png
‘off’: /local/imagens/3d/kleber/transparente.png- type: image
image: /local/imagens/3d/kleber/transparente.png
style:
top: 50%
left: 50%
width: 100%- type: state-icon
entity: switch.cozinha_interruptor_4
style:
left: 65%
top: 10%
width: 9%
tap_action:
action: toggle- type: state-icon
entity: switch.cozinha_interruptor_1
style:
left: 65%
top: 38%
width: 6%
tap_action:
action: toggle- type: state-icon
entity: switch.cozinha_interruptor_3
style:
left: 55%
top: 35%
width: 9%
tap_action:
action: toggle- type: state-icon
entity: light.quarto_meninas
style:
left: 40%
top: 50%
width: 9%
tap_action:
action: toggle- type: state-icon
entity: switch.cozinha_interruptor_4
style:
left: 52%
top: 70%
width: 9%
tap_action:
action: toggle- type: state-icon
entity: switch.sala_interruptor_1
style:
left: 69%
top: 69%
width: 15%
tap_action:
action: toggle- type: state-icon
entity: switch.sala_interruptor_2
style:
left: 77%
top: 47%
width: 15%
opacity: 0.6
‘–mdc-icon-size’: 15px
‘–paper-item-icon-color’: whtite
tap_action:
action: toggle
Bloco de Citação
Acima coloquei o código do jeito que me pediu…
Ainda não ficou da maneira correta.
Coloca 3 crases, o código copiado do card e mais 3 crases
Seu código aqui
Pq vc esta usando image e state para a mesma entidade?
Estou usando para que quando tiver on exiba uma imagem, quando off exiba outro…
Exatamente como no vídeo postado aqui…
Vou tentar de novo o codigo
type: picture-elements image: /local/imagens/3d/kleber/casa_off.png style: top: 30% left: 30% elements: - type: image entity: switch.cozinha_interruptor_4 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/corredor fundos on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.cozinha_interruptor_1 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/cozinha on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.cozinha_interruptor_3 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/hall qto on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: light.quarto_meninas style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/qto meninas on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: light.quarto_casal style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/qto casal on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.sala_interruptor_1 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/sala on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.sala_interruptor_2 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/escritorio kleber on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.sala_interruptor_2 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/hall entrada on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.qto_casal_cama_interruptor_2 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/frente on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.lavanderia_interruptor_1 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/lavanderia on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.lavanderia_interruptor_2 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/muro on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image entity: switch.escritorio_katia_interruptor_1 style: top: 50% left: 50% width: 100% state_image: 'on': /local/imagens/3d/kleber/escritorio katia on.png 'off': /local/imagens/3d/kleber/transparente.png - type: image image: /local/imagens/3d/kleber/transparente.png style: top: 50% left: 50% width: 100% - type: state-icon entity: switch.cozinha_interruptor_4 style: left: 65% top: 10% width: 9% tap_action: action: toggle - type: state-icon entity: switch.cozinha_interruptor_1 style: left: 65% top: 38% width: 6% tap_action: action: toggle - type: state-icon entity: switch.cozinha_interruptor_3 style: left: 55% top: 35% width: 9% tap_action: action: toggle - type: state-icon entity: light.quarto_meninas style: left: 40% top: 50% width: 9% tap_action: action: toggle - type: state-icon entity: switch.cozinha_interruptor_4 style: left: 52% top: 70% width: 9% tap_action: action: toggle - type: state-icon entity: switch.sala_interruptor_1 style: left: 69% top: 69% width: 15% tap_action: action: toggle - type: state-icon entity: switch.sala_interruptor_2 style: left: 77% top: 47% width: 15% opacity: 0.6 '--mdc-icon-size': 15px '--paper-item-icon-color': whtite tap_action: action: toggle
Lembrando que não está pronto, mas quero resolver a questão de quando apertar no ícone da lâmpada a luz faça sua função sem aparecer a tela de interruptor
Eu faço exatamente isso, mas usando só o image.
A única diferença é que para isso o action tem que ser adicionado no image.
E como seria?
Aí eu me perco um pouco kkkk
O meu fica assim.
Como uso a imagem de fundo com todas luzes apagadas, eu só uso o state_image on, mas basta vc adicionar o off caso necessário.
elements:
- type: image
entity: light.corredor_frente_esquerda
tap_action:
action: toggle
hold_action:
action: call-service
service: light.turn_off
data:
entity_id: all
image: local/projeto/android/frente_esq_off1.png
state_image:
'on': local/projeto/android/frente_esq1.png
aspect_ratio: 0%
style:
transform: none
top: 58.9896579157%
left: 43.20%
width: 42.16%
O service não funciona no meu h.a, estou usando tuya, quando chamo esse serviço de trun.off não funciona, me retorna erro, dizendo que não foi possível chamar o serviço!
Não sei se é essa a causa de eu não conseguir executar a ação direto sem a tela do interruptor