Quantcast
Channel: Configuration - Home Assistant Community
Viewing all 106014 articles
Browse latest View live

Prepay meter - Enter remaining kWh into HA

$
0
0

Ho do i do a “Manual” sensor value entry into HA?

I used a pulse counter on my PrePay meter - Prepay meter - estimate when close to zero - How do i? - but the code on the ESP was running MicroPython and with frequent power outages, the unit did not always boot when grid power return.

I am now using ESPEasy to do the pulse counting and convert to kWh that is send to HA once every min. and it has been rock solid.

With changing to ESPEasy, i no longer have the function to send my PrePay meter value - Was a Manual entry as well - to HA to estimate when i need to purchase electricity again.

How can i enter the value into HA?
I created a input field, but i am not happy with my results.

input_number:
  box1:
    name: PrePay kWh
    initial: 0
    min: 0
    max: 5000
    step: .01
    mode: box

I would like to have an input field that set a sensor value that i can use to:

  1. Decrement as power is used
  2. Use the value to estimate when i need to purchase more electricity.

Any help will be appreciated as i am not that good with HA yet…

1 post - 1 participant

Read full topic


Hue outdoor motion sensor does not change on_off to detected in ZHA and cant change sensitivity level

$
0
0

Just added a new Hue outdoor motion sensor in ZHA.
To my big surprise it does not change the “on_off” - it always says “clear” while occupancy changes to “detected”.

I would assume “on_off” is what other sensors calls “ias_zone” which normally stays “detected” 2 minutes and not just 10 seconds.

Anyone got a solution? Not another automation fix like:

but a real solution?

Another problem is that I cant change sensitivity level.
If I try to do like this:

It still says 2 next time I get the property… why?

1 post - 1 participant

Read full topic

Script is running twice?

$
0
0

I have a simple script that runs a alexa routine, but if i play it, i am getting the ‘start cleaning’ message from the robot twice, indicating somehow the script is ran twice. If i run the routine from alexa itself i only get the message once.

alias: Start Dining Room Vacuum
sequence:
  - service: media_player.play_media
    data:
      media_content_type: routine
      media_content_id: Start Diningroom Vacuum
    target:
      area_id: dining_room
mode: single
icon: mdi:robot-vacuum

Anyone know why this is happening?

1 post - 1 participant

Read full topic

Conditional display lovelace

$
0
0

I’ve looked around here but didn’t find a solution yet.
Situation: I have lights in the garden. And the are set ON at Sunset, and set OFF at 23:00.
I’ve created an inputfield “input_datetime.tuinlichten_eindtijd” (end time) with only Time to input.
And that inputfield is put on a card in lovelace, so I can change the “end time”
I want to make both field variable. So, then I have a “start time” and an “end time”
BUT, it must be possible to specify “sunset” , (or sunrise) as value too.
Was thinking I could create 2 input_select fields, with values :“Sunset”,“Sunrise”,“Time” , 1 for the start time, 1 for the end time.
And when “Time” is not selected, the input_datetime field is not visible. When “Time” is not selected, the input_datetime field should be visible.
(additional, when “time” is not selected, an other input_datetime field schould be visible, to be used a offset)
Any idea ? I’ve installed HACS, so, if the solution uses hacs cards, it’s no problem…
thx

1 post - 1 participant

Read full topic

Setting the value of a helper in a Python script deletes the Helper's (friendly) "name"

$
0
0

I’ve created a helper:

I then update the value of this helper in a Python script like so:

hass.states.set("input_boolean.power_on_setting_has_next_entity", "on")

Now I go back to my Helpers screen in the UI, and the Helper’s friendly name (Power On Setting: Does Have Next Entity) is gone.

Why? Is this a bug? what am I doing wrong?

I don’t get any error during the automations utilizing the Python script, and everything is working OK.

2 posts - 1 participant

Read full topic

Creating reusable wled script

$
0
0

Hello,
Im trying to create a reusbale wled script which will have input variables such as effect, brightness, intensity, speed, color

here is my initial script, so please contribute to create awesome script, and later on to announce it as a blueprint.

alias: Wled set light
fields:
  entity:
    description: 'entity for light on service'
    example: 'light.bathroom_wled'  
  speed:
    description: 'speed of wled effect'
    example: '100'
  speed_entity:
    description: 'entity for speed number wled'
    example: 'number.wled_lr_below_tv_speed'
  intensity:
    description: 'intensity of wled effect'
    example: '60'
  intensity_entity:
    description: 'entity for intensity number wled'
    example: 'number.wled_lr_below_tv_intensity'
  palette_entity:
    description: 'sets wled palette'
    example: 'select.wled_lr_below_tv_color_palette'
    default: 'Default'
  brightness_light:
    description: 'Sets the brightness'
    example: '100'
    default: 100
  rgb:
    description: 'Sets the colors'
    example: '100,242,100'
    default: '100,100,100'
  effect:
    description: 'sets effect'
    example: 'Twinkle'
    default: 'Solid'
    
sequence:
  # - choose:
  #   - conditions: '{{ if speed_entity is defined}}'
  #     sequence: 
        - service: light.turn_on
          target:
            entity_id: "{{ entity }}"
          data:
            brightness: "{{ brightness_light }}"
            # rgb_color: > 
            #   - '{{ rgb.split(",")[0].strip() | default(100, true) | int }}'
            #   - '{{ rgb.split(",")[1].strip() | default(50, true) | int }}'
            #   - '{{ rgb.split(",")[2].strip() | default(200, true) | int }}'  
            effect: "{{ effect }}"

        - service: select.select_option
          target:
            entity_id: "{{ palette_entity }}"
          data:
            option: "{{ state_attr('palette_entity', 'options') | random }}"

        - service: input_number.set_value
          target:
            entity_id: "{{ speed_entity }}"
          data:
            value: "{{ speed }}"
    # - conditions: '{{ if intensity is defined}}'
    #   sequence: 
        - service: input_number.set_value
          target:
            entity_id: "{{ intensity_entity }}"
          data:
            value: "{{ intensity }}"

What do you think? should I add something more here?
*This script is not tested, just wrote it from my head, so it’s probably broken

1 post - 1 participant

Read full topic

Switch on heater with generic thermostat with simple on/off switch

$
0
0

Hi all,

I started using the generic thermostat integration to control the temperature of my greenhouse. It really looks easy to setup (I’m not that experienced with HA yet).For the heater the documentation states I need a toggle device to switch the heater on/off. I have a simple on/off switch (so no toggle device). Can I use this and if so how to cofigure this?
I would be very thankfull if somebody can help me out with this.

Regards,
Herman

1 post - 1 participant

Read full topic

Stupid question about canceling an automation

$
0
0

Hi there,

I have created an automation (draft) that should remind me of open windows via Alexa.
The design looks like this:

alias: Fensterwarnung Arbeitszimmer
description: ''
trigger:
  - type: opened
    platform: device
    device_id: a3b660743a3ade9f221523df6512bbe7
    entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_19330507_on_off
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 30
condition:
  - condition: state
    entity_id: sensor.moritz_aussentemperature_wrg
    state: <6
action:
  - repeat:
      count: '4'
      sequence:
        - service: media_player.play_media
          data:
            media_content_id: amzn_sfx_lightning_strike_02
            media_content_type: sound
          target:
            entity_id:
              - media_player.arbeitszimmer
              - media_player.eva_s_bose_smart_soundbar_300
              - media_player.bad
              - media_player.terrasse
              - media_player.workstatt
              - media_player.moritz
              - media_player.torstens_echo_dot
        - service: notify.alexa_media
          data:
            message: >-
              Fenster im Arbeitszimmer sind schon länger geöffnet. Bitte wieder
              schließen
            target:
              - media_player.workstatt
              - media_player.terrasse
              - media_player.moritz
              - media_player.bad
              - media_player.arbeitszimmer
              - media_player.eva_s_bose_smart_soundbar_300
              - media_player.torstens_echo_dot
            data:
              type: tts
        - delay:
            hours: 0
            minutes: 0
            seconds: 30
            milliseconds: 0
mode: single

Two questions about this:

  1. How can I ensure that the automation is canceled when the corresponding window is closed again?
  2. I have built in the condition that the automation only starts at a certain temperature. Did I do it correctly “<6”?

Many Thanks.

Greetings Werner

1 post - 1 participant

Read full topic


Include problems in Configuration.yaml

$
0
0

Hello,
I have been trying to use the include in the configuration.yaml and I’m running into issues that I really don’t understand why this is happening. I have multiple sensors files that I have stored in the sensors folder. If I include them in the configuration.yaml most of the sensors are not ‘working’. I can’t find them back in the developer tools. Depending on the sensor I will get some float errors or that the senors couldn’t be created and in some cases the sensor will have the attribute/state unkown.

The strange thing is if I add most of the files (as a test) in the configuration.yaml file the senors are working (and no errormessages in the log file). But now the configuration file is getting bigger and bigger and is not readable anymore (due to amount of lines).

These are the includes that I have added.

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
light: !include lights.yaml
sensor: themes: !include_dir_merge_list sensors/

Any idea what I’m doing wrong?
Thanks.

1 post - 1 participant

Read full topic

Mosquitto integration on home assistant portable

$
0
0

hi everyone , i am new in the forum. please advise me how to add mosquitto into home assistant portable.
thanks.

1 post - 1 participant

Read full topic

Use trigger timeout to turn off switch after time elapsed or at certain time (whichever is sooner)

$
0
0

Do I have this automation configured correctly to work as expected (according to the description)? I’ve never used trigger timeouts before. I did this in the Automations UI since YAML is a copy-and-paste kind of thing for me.

alias: Banister Lights on in Evening
description: >-
  Turns on the banister lights at sunset and then turns them off 5h45m later or
  at 10:30pm (whichever is sooner). 
trigger:
  - platform: sun
    event: sunset
    offset: '-00:00:00'
condition: []
action:
  - type: turn_on
    device_id: 994d492fdbae803341f36b0680164bba
    entity_id: switch.banister_lights_socket
    domain: switch
  - wait_for_trigger:
      - platform: time
        at: '22:30:00'
    timeout: '05:45:00'
  - type: turn_off
    device_id: 994d492fdbae803341f36b0680164bba
    entity_id: switch.banister_lights_socket
    domain: switch
mode: single

1 post - 1 participant

Read full topic

Expressing alarm sensor as days / hours / minutes in future

$
0
0

I have a sensor from the HA mobile app that reflects the next alarm set on my phone. I’m trying to express it as something similar “The next alarm will happen in 1 day, 2 hours and 10 minutes”. I can work out the if/then logic to handle when I have or don’t have days/hours (alarm is less than a day or less than an hour).

I’m having trouble isolating the number of hours or minutes in the future that the alarm is set for.

{% set next_alarm = as_local(as_datetime(states('sensor.phone_next_alarm'))) %}
{% set alarm_diff = (next_alarm - now()) %}

next alarm: {{next_alarm}}
day of the week of next alarm: {{next_alarm.strftime('%A')}}
hour of next alarm: {{next_alarm.hour}}
minutes of next alarm: {{next_alarm.minute}}

Timedelta {{alarm_diff}}

how many days in the future: {{alarm_diff.days}}

which yields something like

next alarm: 2022-01-07 11:30:00-05:00
day of the week of next alarm: Friday
hour of next alarm: 11
minutes of next alarm: 30

Timedelta 2 days, 1:03:59.990890

how many days in the future: 2

But there doesn’t appear to be a “minutes” or “hours” attribute of the alarm_diff (like {{alarm_dif.minutes}} or {{alarm_diff.hours}}

Can someone point me in the right direction?

1 post - 1 participant

Read full topic

Knx light entity and blocking entity from motion detector

$
0
0

Hello
I have the following problem. My knx light is controlled by a knx motion detector now the problem is the following i want to create an automation that when home assistant entity state of the light is changed only on the bus of home assistant not the device itself that the blocking channel of my detector is switch on or off depeding on the state of the light in home assistant. So basically when i turn the light on from home assistant it stays on forever and the detector cannot turn it off even when I activated it.
So far this is where i am

- id: '1641393235216'
  alias: tehnical room detector on
  description: ''
  trigger:
  - platform: state
    entity_id: light.tehnical_room
    from: 'off'
    to: 'on'
  condition: []
  action:
  - service: switch.turn_on
    target:
      entity_id: switch.detector_panel_down_block
  mode: restart
  
- id: '1641393235217'
  alias: tehnical room detector off
  description: ''
  trigger:
  - platform: state
    entity_id: light.tehnical_room
    from: 'on'
    to: 'off'
  condition: []
  action:
  - service: switch.turn_off
    target:
      entity_id: switch.detector_panel_down_block
  mode: restart

Any help would be apreciated

2 posts - 2 participants

Read full topic

History graph ignores units

$
0
0

Hi,

I have temperature (°C) and relative air humidity (%) sensors in my rooms. In order to save space I want to put both graphs into one history graph. But since Homeassistant neither seems to allow setting a custom x-axis text nor using of two x axis per graph with their respective units on the left and right side, I wanted to go with the temperature and humidity sensors both using a combined unit_of_measurement: "°C / %" . But for some reason the history graph only ever seems to pick up the first one in the string, even though the dev tools show the correct unit. Is this WAD? And any ideas to fix this?

Thanks

1 post - 1 participant

Read full topic

Turn off lights getting in bed

$
0
0

trying to automate turning off the lights when i get in bed. don’t judge. tried using when i put my phone on my charging pad, but it’s not reliable at all. thought about attaching a vibration sensor to the bed frame, but think it will just chew battery as i move around all night. picked up a zooz vibration sensor that took usb, but it didn’t work at all. don’t want a motion sensor pointed at the bed. anyone have a good idea? thanks,

-SM-

2 posts - 2 participants

Read full topic


Scenes (e.g., double tap) on the GE (Jasco) Enbrighten Motion Sensor Switch

$
0
0

I read that this GE Enbrighten Z-Wave Plus Smart Motion Sensor Light Switch supports scenes, so I was thinking I could use double and triple taps to perform automations like I do with my Inovelli smart dimmers. However, I’ve only been able to use a double-tap down. Has anyone with this switch gotten it to work? Does it actually support double and triple taps? These are the triggers available for it in Home Assistant:


When selecting Scene Activation on Endpoint 0, it provides a Value option that ranges from 0 to 255. When I select Basic CC event on Endpoint 0, I get the same 0 - 255 value option and this event seems to be triggered when I double-tap down on the switch (regardless of whether I have the value set to 0 or 255). So, I could use the double-tap down to close my garage, for instance, but I’m not seeing a way to use double-tap up to open the garage, use triple-taps, etc.

If it doesn’t support these multiple taps, what exactly does “scenes” in the product description mean that it’s capable of? I love my Inovellis for the double (and triple/quadruple/quintuple) tap feature.

I’ve also been looking at this UltraPro Z-Wave Smart Rocker Light Dimmer switch. How do I know if it supports this feature the way the Inovelli switches do?

1 post - 1 participant

Read full topic

Card-mod ignores style properties

$
0
0

i´m having some issues with the card-mod ignoring my style settings.

I changed to the new prefered method of defining the card-mod in the configuration file as below,

frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /local/plugins/card-mod.js

and i use Minimalist theme/addon for Dashboard where I´m trying to change the style on the Title but no matter what i input into the card_mod style it is not changing the output.

I can see in the console that the card-mod.js is loaded correctly “CARD-MOD 3.1.1 IS INSTALLED”.

          - type: horizontal-stack
            title: Utomhus
            card_mod:
              style: |
                .card-header{
                  color: red !important;
                  font-size: 8px !important;
                }

cant for the life of me figure out what I´m doing wrong, tried moving the style further up in the tree but not sure of its appending the style on childs by intention or it needs to be defined on current object, neither works.

Any help or tips would be appreciated

Christian

1 post - 1 participant

Read full topic

Switch with 8 buttons to run 8 different scripts

$
0
0

The folliwing code is starting the script if I push button 1 (property_key: '001').
Is it possible to run different scripts if i push button 2 (property_key: '002') in the same automation insted of having eight different automations.

alias: SWI - AUT - NAMRON 8 - TEST MULTI
description: Namron switch
trigger:
  - platform: event
    event_type: zwave_js_value_notification
    event_data:
      node_id: 30
      device_id: 2573389a45104a1eab8a9d3d80869295
      property_key: '001'
      value: KeyPressed
    id: '30'
condition: []
action:
  - service: script.test2_45_sec_on
mode: single

2 posts - 2 participants

Read full topic

MQTT to html in Home Assistant

$
0
0

Hi, I’m using Fully Kiosk on a tablet, but I don’t like the screensaver. I thought I would turn Rpi with Home Assistant into a server where I read the sensors and publish them to HTML, which I would then use as a screen saver, just the most important data. I tried “Home assistant display”, but I’m doing something wrong. I modified index.html to HA address, added the port I use on MQTT, but nothing is displayed at all.
Any idea how to get started?


1 post - 1 participant

Read full topic

Get current temperature of Fritz! Dect 301

$
0
0

Hi all,

I am using multiple Fritz! Dect 301 thermostats. I added all devices via the provided AVM Fritz!Smarthome integration. I want to display the temperature one device is currently measuring. Home Assistant doesn’t show me an entity to do that. I can only see these entities for each thermostat:

  • climate.bathroom
  • sensor.bathroom_battery
  • sensor.bathroom_comfort_temperature
  • sensor.bathroom_current_scheduled_preset
  • sensor.bathroom_eco_temperature
  • sensor.bathroom_next_scheduled_change_time
  • sensor.bathroom_next_scheduled_preset
  • sensor.bathroom_next_scheduled_temperature

How can I read the current temperature?

Following the documentation (AVM FRITZ!SmartHome - Home Assistant) there should also be an attribute called “window_open”. How can I use this, too?

1 post - 1 participant

Read full topic

Viewing all 106014 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>