Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Needed: overview for custom_updater... how to/instructions #22

Closed
Mariusthvdb opened this issue Sep 13, 2018 · 21 comments
Closed

Needed: overview for custom_updater... how to/instructions #22

Mariusthvdb opened this issue Sep 13, 2018 · 21 comments

Comments

@Mariusthvdb
Copy link

Mariusthvdb commented Sep 13, 2018

Is your feature request related to a problem? Please describe.
a bit of both, no bug!
Since there's not much documentation on rather an important detail, please let me ask here (tried the community, but no response yet)

How to configure the custom_card tracker (on Hassio Non lovelace).

As of now, I have 2 sensors in the frontend displaying rather unmeaningful states, More-Info is alright.
That is, on the custom component, where I was able to set several components to track.

Not so on the custom_cards.

Describe the solution you'd like
Some instruction and examples how to configure

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

What would be really cool: a list of currently available cards and components to simply copy into the configuration. Not that many cards and CC' yet , so hope thats an option?

Additional context
Add any other context or screenshots about the feature request here.

schermafbeelding 2018-09-13 om 16 48 46
schermafbeelding 2018-09-13 om 16 48 52

custom_updater:
  component_urls:
    - https://raw.githubusercontent.com/robmarkcole/Hue-sensors-HASS/master/custom_updater.json
    - https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
  card_urls:
  show_installable: True
@ludeeus
Copy link
Contributor

ludeeus commented Sep 13, 2018

Thanks for this, and I agree I need to add some more options and details for non lovelace users.
Will try to have a look at some options during this weekend.

@ludeeus
Copy link
Contributor

ludeeus commented Sep 21, 2018

The first step are now in place https://github.com/custom-components/custom_updater/releases/tag/2.7.0

@ludeeus
Copy link
Contributor

ludeeus commented Sep 29, 2018

@Mariusthvdb Can you check out version 3.0.0 and see if that are more suited for users without Lovelace?

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Sep 29, 2018

just upgraded:

schermafbeelding 2018-09-29 om 21 22 05
much better! thx.

No updates yet, so cant check if I need any :-)

One thing maybe: I see all cards and components listed, while I have only 4 installed of which 3 are form the same repo. Is this what you expected?

Right now I don't have the cards option selected, but would like to add the custom-ui, can't find the correct url to do so. https://github.com/andrey-git/home-assistant-custom-ui

@ludeeus
Copy link
Contributor

ludeeus commented Sep 29, 2018

Yes and no.
For this version I expect that, and I'm unsure about if I want to do remove them

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Sep 29, 2018

Ok understand. Do I need to list any repo in the config at all then? If you list all cards and repos anyway?

@settings settings bot removed the to do label Sep 29, 2018
@ludeeus
Copy link
Contributor

ludeeus commented Sep 29, 2018

Yes, by default the component has 2 "repos", you you want more then that you still need to add them.
The "repos" that are default are:
https://github.com/custom-components/information/blob/master/repos.json
https://github.com/custom-cards/information/blob/master/repos.json

@ludeeus
Copy link
Contributor

ludeeus commented Sep 29, 2018

@Mariusthvdb Just released 3.1.0 that I think will be more what you want :)
https://github.com/custom-components/custom_updater/releases/tag/3.1.0

Are there any more wishes for this now?

@Mariusthvdb
Copy link
Author

not really sure what the change is here? I still see the complete list in components.

btw, does the card checker look in a dedicated folder? Ive got my lovelace cards in /local/custom-ui/lovelace but the sensor.custom_card_tracker isn't created. I have no repos defined, so I believed it would read the default repos you posted above?

@ludeeus
Copy link
Contributor

ludeeus commented Sep 29, 2018

nvm... I see now that you have show_installable: True, that will still show all :)
https://github.com/custom-components/custom_updater/wiki/Installation#configuration-option-show_installable

There was a change, now it only tracks components by default, if you want to track cards and/or python_scripts, you need to enable that in your config.

https://github.com/custom-components/custom_updater/wiki/Installation#configuration-option-track

@Mariusthvdb
Copy link
Author

have all installed now, but no difference in state. will check tomorrow.

omt: if I try to customize the sensor using my default setup:

customize:
    sensor.custom_component_tracker:
      templates:
        icon: >
          if (state > 0) return 'mdi:cloud-upload';
          return 'mdi:cloud-search';
        icon_color: >
          if (state > 0) return 'rgb(251, 210, 41)';
          return 'grey';

nothing happens. Ive tried

customize:
    sensor.custom_component_tracker:
      templates:
        icon: >
          if (state > '0') return 'mdi:cloud-upload';
          return 'mdi:cloud-search';
        icon_color: >
          if (state > '0') return 'rgb(251, 210, 41)';
          return 'grey';

but still no change in the frontend.

Pleas let me ask what the state is? string, int, or? I cant seem to get it right.

@ludeeus
Copy link
Contributor

ludeeus commented Sep 29, 2018

The difference would not be in the state.
If you set show_installable to False (or remove it) you would see a lot less in the attributes.

And if you enable cards and components under track you will see another sensor.

The sensor value is an int, but it is not explicit defined in the code, so HA might interpret it as a string..

I have no idea about what you are trying do do in your examples :P
This give me a True/False response in the template editor:

{{ states('sensor.custom_component_tracker') > '0' }}

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Sep 30, 2018

HI,
thx!
so show_installable actually is show_all_available, and not show the updates available?
Iif I set it to False, the sensor will show only the available updates for my installed components?
Because thats what I was trying to establish:
have the sensor check which components I have installed, and check for available updates.

I have no idea about what you are trying do do in your examples :P
This give me a True/False response in the template editor:

{{ states('sensor.custom_component_tracker') > '0' }}

with this customization I am setting an icon and icon_color depending on the state, and have the frontend give visual feedback about the state, instead of the default and rather meaningless eye...

like this:

schermafbeelding 2018-09-30 om 09 14 43
schermafbeelding 2018-09-30 om 09 14 51

wont work yet, I think because the sensors are made in the Python script, id have to set these there:

example:

whichIcon = familyIcon[count_home] if count_home <= 3 else familyIcon[-1]
icon_color = familyColor[count_home%len(familyColor)]

hass.states.set('sensor.family_home', count_home, {
    'custom_ui_state_card': 'state-card-custom-ui',
    'friendly_name': 'Family Home?',
    'home': ', '.join(home),
    'away': ', '.join(away),
    'icon': whichIcon,
    'count_home': count_home,
    'count_away': count_away,
    'family_count': familyCount,
    'icon_color': icon_color ,
    'show_last_changed': 'true'
     })

leading tho this:
schermafbeelding 2018-09-30 om 09 17 38

though, I have the icons of the Hue CC set too in my customizations, and they work just fine:

schermafbeelding 2018-09-30 om 09 52 52

set like this:

sensor.telefoon:
  show_last_changed: true
  templates:
    icon_color: >
      if (state === 'on') return 'rgb(251, 210, 41)';
      return 'rgb(54, 95, 140)';
    icon: >
      if (state === 'on') return 'mdi:cellphone-iphone';
      return 'mdi:cellphone-off';

but nvm, maybe in another thread ;-)

still if

The sensor value is an int, but it is not explicit defined in the code, so HA might interpret it as a string..

The template in fact should be:
{{ states('sensor.custom_component_tracker')|int > 0 }}

@Mariusthvdb
Copy link
Author

can confirm your changes worked for the sensors state to show available updates;

schermafbeelding 2018-09-30 om 12 11 31
schermafbeelding 2018-09-30 om 12 11 38

cool, thx.

@ludeeus
Copy link
Contributor

ludeeus commented Sep 30, 2018

With the launch of version 3x I also moved the documentation for this to the repo wiki, and expanded it a bit, it should now cover your initial "issue"
"Since there's not much documentation "

https://github.com/custom-components/custom_updater/wiki/Installation

@sendorm
Copy link

sendorm commented Sep 30, 2018

After doing the update to 3.1.0 manually. I can't seem to find the components. When I set the show_installable: True to see all available components, I see the custom_updater's and sensor.aftership's statuses as n/a. I've both those components installed and working btw.
I've also have the track for components and cards enabled. I have hass version 0.79.0.
Thank you.

@ludeeus
Copy link
Contributor

ludeeus commented Sep 30, 2018

@sendorm If you encounter an issue that is not identical to this please open another issue for it.
show_last_changed are not an option of this component.

@sendorm
Copy link

sendorm commented Sep 30, 2018

Wrong copy paste. I’ve corrected the original post. Ok, I’ll create a new issue. Thanks.

@ludeeus
Copy link
Contributor

ludeeus commented Sep 30, 2018

Still not the same issue as OP @sendorm ;)
But it looks similar to custom-cards/tracker-card#21

@sendorm
Copy link

sendorm commented Oct 1, 2018

Yes, I knew it was not the same issue as the OP. That's why I was going to create a new issue :) The one you suggest seems to be the same case, thanks for directing me to the correct issue :) I'll be following that one.

@ludeeus
Copy link
Contributor

ludeeus commented Oct 2, 2018

Closing this issue, further customization from this will be done in #35

@ludeeus ludeeus closed this as completed Oct 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants