New widgets: input slider(horizontal and vertical), input select and light with brightness

like i asked before

I got the same look when I tried to install a theme and forgot to put the CSS in the folder. If you open the browser’s console and reload the page do you get any error?

Nothing changed in the dashboard

Will check this. I have just added custom_css folder, nothing more nothing less.

Is this now included in new appdaemon version?

If so, I will wait for the HASSIO addon update

it is added to AD 3.0 beta
but it will be a few months untill that release will come out of beta and an addon will be created (unless someone creates a addon for the beta)

css from custom_css has to be put somewhere else?

in custom_css you only do put you selfmade(or copied) skins
the css in those files need to be accurate

I downloaded yours, without touching anything. It has to be in the same place as custom_widhet?

Finally is working, the solution is that you do not have to use the custom_css at all, just custom_widget. Nowhere was written this.

. Below is my code. Now I see the slider and I see the selectbox correctly. Now need to cnnect this to my entity_id.

If one box is a volume slider, other box is select source of AVR, what would you do: a third box for launching a script that takes the value of the volume and source???

marantz_volume:
  widget_type: new_input_slider
  entity: input_number.marantz_volume
  title: Marantz
  title2: Volume
marantz_video_select:
  widget_type: input_select
  entity: input_select.marantz_video_select 
  title: Marantz
  title2: selectbox

tried this script but not working

  marantz_dashboard:
    alias: Marantz volume set and source select
    sequence:
      - service: media_player.turn_on
        entity_id: 
          - media_player.marantz
      - service: media_player.volume_set
        data:
          entity_id: media_player.marantz
          volume_level: '{{ states('input_number.marantz_volume') }}'
      -  service: media_player.select_source
         data_template: 
           entity_id: media_player.marantz
           source: '{{ states('input_select.marantz_video_select') }}'

sorry i have no idea about scripts. i never used them

what would be the code for a input_slider to change volume on a AVR?

input slider widget needs an entity that can be set by the input number service.
so i expect that it can only set an input_number

you could create an input_number in HASS and and automation that changes the volume from the AVR when the input_number changes.

ahh right! How would be a code inside an automation for a “change” in input_slider?

sorry i cant help you with that.
i dont use automations.

that’s the solution for anyone interested

input_number:
  portable_speaker_volume:
    name: Volume
    icon: mdi:volume-high
    initial: 40
    min: 0
    max: 100
    step: 1


automation:
  - alias: Set Portable speaker Slider Position
    trigger:
      - platform: state
        entity_id: media_player.portable_speaker
    condition:
      - condition: template
        value_template: "{{ not is_state_attr('media_player.portable_speaker', 'volume_level', states('input_number.portable_speaker_volume') | int / 100) }}"
    action:
      - service: input_number.set_value
        entity_id: input_number.portable_speaker_volume
        data_template:
          value: "{{ trigger.to_state.attributes.volume_level | multiply(100) | int }}"

  - alias: Set Dining room speaker Volume
    trigger:
      - platform: state
        entity_id: input_number.portable_speaker_volume
    condition:
      - condition: template
        value_template: "{{ not is_state_attr('media_player.portable_speaker', 'volume_level', states('input_number.portable_speaker_volume') | int / 100) }}"
    action:
      - service: media_player.volume_set
        entity_id: media_player.portable_speaker
        data_template:
          volume_level: "{{ states('input_number.portable_speaker_volume') | int / 100 }}"

trying now to do the same with input_select.
Help appreciated

Im getting issues, where stdout is coming up with errors such as

WARNING Variable definition not found in CSS Skin variables: $new_input_slider_title_style
WARNING Variable definition not found in CSS Skin variables: $new_input_slider_title2_style
WARNING Variable definition not found in CSS Skin variables: $new_input_slider_minvalue_style
WARNING Variable definition not found in CSS Skin variables: $new_input_slider_maxvalue_style
WARNING Variable definition not found in CSS Skin variables: $new_input_slider_value_style
WARNING Variable definition not found in CSS Skin variables: $new_input_slider_slider_style
WARNING Variable definition not found in CSS Skin variables: $new_input_slider_widget_style

My dashboard entry is

MornTemp:
widget_type: new_input_slider
entity: input_number.morning_temp
title: Just a
title2: slider

Any ideas?

you need to put the variables in the skin.
if you use the default skin you need to find the variables.yaml in a dir like:
/usr/local/lib/python3.5/dist-packages/appdaemon/assets/css/default

then you need to add the variables that i have put in the file

in that file.
if you use a skin or a default skin you need to put the variables in the variables.yaml from that skin.

thanks, i’ll give it a go. Swift response :slight_smile:

1 Like