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

Invisible when casting #80

Open
TomaszDom opened this issue May 3, 2022 · 9 comments
Open

Invisible when casting #80

TomaszDom opened this issue May 3, 2022 · 9 comments

Comments

@TomaszDom
Copy link

Mini climate card is invisible when the view is cast, at least to my Google Nest Hub 2nd Gen. All other cards show up correctly.

      - type: custom:mini-climate
        entity: climate.lazienka_grzejnik
        target_temperature:
          step: 0.5
        secondary_info: hvac-mode
        indicators:
          valve:
            icon: mdi:valve
            unit: '%'
            round: 1
            source:
              entity: sensor.lazienka_grzejnik_position
          preset_mode:
            icon: mdi:car-cruise-control
            source:
              attribute: preset_mode
        icon: mdi:radiator
        fan_mode:
          hide: 'on'
          active: false
          icon: mdi:none
          disabled: true
        buttons:
          preset_mode:
            type: dropdown
            location: main
            icon: mdi:thermometer
            state:
              attribute: preset_mode
            active: state => state !== 'none'
            source:
              eco: Eco
              comfort: Comfort
              boost: Boost
              manual: Manual
            change_action: >
              (selected, state, entity) => this.call_service('climate',
              'set_preset_mode', { entity_id: entity.entity_id, preset_mode:
              selected })
      - type: custom:mini-climate
        entity: climate.salon
        target_temperature:
          step: 0.5
        secondary_info: hvac-mode
        indicators:
          valve_left:
            icon: mdi:valve
            unit: '%'
            round: 1
            source:
              entity: sensor.salon_lewy_position
          valve_right:
            icon: mdi:valve
            unit: '%'
            round: 1
            source:
              entity: sensor.salon_prawy_position
          preset_mode:
            icon: mdi:car-cruise-control
            source:
              attribute: preset_mode
        icon: mdi:radiator
        fan_mode:
          hide: 'on'
          active: false
          icon: mdi:none
          disabled: true
        buttons:
          preset_mode:
            type: dropdown
            location: main
            icon: mdi:thermometer
            state:
              attribute: preset_mode
            active: state => state !== 'none'
            source:
              eco: Eco
              comfort: Comfort
              boost: Boost
              manual: Manual
            change_action: >
              (selected, state, entity) => this.call_service('climate',
              'set_preset_mode', { entity_id: entity.entity_id, preset_mode:
              selected })
      - type: custom:mini-climate
        entity: climate.sypialnia
        target_temperature:
          step: 0.5
        secondary_info: hvac-mode
        indicators:
          valve_left:
            icon: mdi:valve
            unit: '%'
            round: 1
            source:
              entity: sensor.sypialnia_lewy_position
          valve_right:
            icon: mdi:valve
            unit: '%'
            round: 1
            source:
              entity: sensor.sypialnia_prawy_position
          preset_mode:
            icon: mdi:car-cruise-control
            source:
              attribute: preset_mode
        icon: mdi:radiator
        fan_mode:
          hide: 'on'
          active: false
          icon: mdi:none
          disabled: true
        buttons:
          preset_mode:
            type: dropdown
            location: main
            icon: mdi:thermometer
            state:
              attribute: preset_mode
            active: state => state !== 'none'
            source:
              eco: Eco
              comfort: Comfort
              boost: Boost
              manual: Manual
            change_action: >
              (selected, state, entity) => this.call_service('climate',
              'set_preset_mode', { entity_id: entity.entity_id, preset_mode:
              selected })

20220503_114919

screenshot

I'm running Home Assistant 2022.4.7 with mini-climate-card v2.1.1.

@regevbr
Copy link
Collaborator

regevbr commented May 3, 2022

I never tried to cast my HA before. I wanted to check what I can do but the cast feature is completely messed up (at least for me) and sadly I have no way to debug why that happens to you... If anyone with the tech skills and a proper device to cast to can have a look I will happily assist

@TomaszDom
Copy link
Author

By messed up do you mean you get a white screen? I also have this problem, I work around it by first casting a much simpler view, waiting a few seconds and then casting the target view (as an automation of course).

@regevbr
Copy link
Collaborator

regevbr commented May 3, 2022

I spent a good amount of time reading through the blogs and forums and the conclusion is always that no one can reliably get custom cards to work... There is no proper way to debug the cast (even if I did manage to cast it) so sadly I will have to leave this issue unresolved (unless someone is willing to take care of it)

@swiergot
Copy link

From https://cast.home-assistant.io/faq.html:

WHY DO SOME CUSTOM CARDS NOT WORK?

Some custom cards rely on things that are only available in the normal Home Assistant interface. This requires an update by the custom card developer.

If you're a custom card developer: the most common mistake is that LitElement is extracted from an element that is not available on the page.

Does it mean anything to you?

@regevbr
Copy link
Collaborator

regevbr commented Jun 28, 2022

It does, I read it before, still, sadly, I don't know why it does not work :-( All the lit elements I rely on come repacked into this card, I don't rely on them coming from HA

@Ovidiu1973
Copy link

Ovidiu1973 commented May 2, 2023

Great card, I have started using it, but when I try to cast on a Google Nest Hub (2nd Gen), the cards are not showing up

I have the same issue.

P.S. Other customs cards are Ok.

HA-screen
Cast-Screen

@regevbr
Copy link
Collaborator

regevbr commented May 2, 2023

a PR is more than welcome, I don't know how to handle that

@Ovidiu1973
Copy link

sorry, I'm a beginner in HA, what means PR ? yaml code ?
To simulate the error you need to use https://cast.home-assistant.io/ and to have NabuCassa or cloud-enable thru (Cloudflare).
You can cast on any compatible device with, same error (not casting the cards) also on a TV (LG)

@regevbr
Copy link
Collaborator

regevbr commented May 2, 2023

PR = github pull request. Meaning if someone can find the issue and fix it, I will check the fix and release a new version. Sadly, I don't have the capacity or the knowledge to fix that issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants