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

Notify config for SMTP fails to create service if I include password

$
0
0

@GordonM wrote:

When I add the following config to my configuration.yaml file and reboot HA the service is not found in the Developer Tools Services list. I performed a lot of trial and error tweaks to the config and narrowed the problem down to the password. If I remove the password config completely the service is created. Add it back in and the service fails to build. All I’m trying to do at this point is just create the service, not call it, but the password entry messes up the service build. What is the trick to configuring the password?

notify:
  - name: Notifier_General
    platform: smtp
    server: smtp.gmail.com
    port: 587
    timeout: 15
    encryption: starttls
    username: myemail@gmail.com
    password: secretpassword
    sender: myemail@gmail.com
    sender_name: Home Assistant
    recipient: anotheremail@gmail.com

Posts: 1

Participants: 1

Read full topic


Snapshot restores nothing but add-on

$
0
0

@holmiephoto wrote:

My SD card died. So I flashed a new on and added samba and placed my add on in there from a week ago. I have tried both wipe and restore and restore, and nothing happens. I get my add-ons put back but no config files. I have a lot of node red flows I would like to get back. Any ideas? Logs show that my restore is successful. My config does not even come back.

Posts: 1

Participants: 1

Read full topic

MotionEye iFrame login

$
0
0

@TinBasher77 wrote:

I’ve been able to add my rtsp camera feed into MotionEye and create a link for Iframe but it keeps asking for the MotionEye login everytime I leave the page and come back. Anyone know of a fix for this?

Posts: 2

Participants: 2

Read full topic

Z-Wave Node Group Status

$
0
0

@cap60552 wrote:

I have a wall switch (Jasco 14294) that I have controlling a Nano Dimmer (AEON Labs ZW111)by way of a Node Group Association. (Doing it this way due to a really awkward wiring situation that can’t be changed) This works great for the local control of the devices and keeps the switch status indicator leds in sync with the nano dimmer. However I cannot seem to get the states to stay synced in Home Assistant.

When I turn the dimmer off via the wall switch home assistant doesn’t notice the status change in the dimmer. (It does notice the switch status change)
When I turn the dimmer off via HA the wall switch does notice the change and updates correctly.

Any idea as to what I can do to get the nano to report the group association based state change back to HA?

  • Nano Dimmer

    • Group 2 (retransmit) member -> Wall Switch
  • Wall Switch

    • Group 2 (basic load) member -> Nano Dimmer

Posts: 1

Participants: 1

Read full topic

Detect Light Switch Flash On-Off In Automation

$
0
0

@stevendom57 wrote:

Is there any way in an automation to detect when I quickly turn a light switch on then off within, say 5 seconds? I would like to do something different in that case, such as turn the light yellow instead of white. It has both a wall switch and a color changing bulb.

Thanks

Posts: 2

Participants: 2

Read full topic

Tellstick sensors showing as switches

$
0
0

@jra72 wrote:

Hi! Trying to integrate a Tellstick and Telldus thermo-/hygrometer (433Mhz) to HA. My first Tellstick integration. Problem is that sensors are showing as switches in developer tools (switch.insidetemp, switch.outsidetemp). Ids, models and protocols are from Telldus Live sensor details. Where am I taking a wrong turn?

Calling hassio.addon_stdin with {“addon”:“core_tellstick”,“input”:{“function”:“list-sensors”}} returns nothing but {“addon”:“core_tellstick”,“input”:{“function”:“list”}} returns

[08:29:44] INFO: TellStick list success -> Number of devices: 2
15	InsideTemp	OFF
14	OutsideTemp	OFF

configuration.yaml

tellstick:
    host: core-tellstick
    port: [50800, 50801]

sensor:
  - platform: tellstick
    temperature_scale: "°C"

Tellstick add-on conf

devices:
  - id: 15
    name: InsideTemp
    protocol: fineoffset
    model: temperaturehumidity
  - id: 14
    name: OutsideTemp
    protocol: fineoffset
    model: temperature

Posts: 1

Participants: 1

Read full topic

Can't get set.var to run ? yaml problem?

$
0
0

@Liese wrote:

Hi, I tried to get it working.
Like here

I think in exactly the same way. OK, I deleted the Trigger etc. for debugging…
VAR component is installed…via HACS.

I included following in the config.yaml file:

var:
  printer_pages_at_month_start:
    friendly_name: 'HP Printer Pages at month start'
    initial_value: 50

I added following automation - initially without var.update -
to automation.yaml

- id: hp_instant_ink_per_month
  alias: HP Instant Ink per Month
  trigger: []
  condition: []
  action:
  - service: var.set
     data:
       entity_id: var.printer_pages_at_month_start
       value: "{{ states('sensor.hp_printer_printer')|int }}"
  - service: var.update
      data:
        entity_id: var.printer_pages_at_month_start

But the variable won’t be updated.
Any idea what’s wrong here?
It seems I am struggling again with yaml ?

Best regards
Joerg

Posts: 1

Participants: 1

Read full topic

Multiple lovelace cards in the same spot, based on a state?

$
0
0

@crackers8199 wrote:

i’ve been trying to set up lovelace to give me a button to resume program on my ecobee thermostats if a hold is in progress, and if no hold is in progress show a button that says “no holds” or something similar. i have been trying to do this with a conditional card, and it works just like i want it to except for one minor detail that is killing me and my OCD - when the conditions flip, there’s a slight little buffer on one or the other, so the cards aren’t in the same spot.

is there a way to get both of these cards in the same spot, so that when they change there’s no visible change on the screen other than the words/icon changing (but the button size stays the same)?

i hope that makes sense, LMK if you need something clarified in order to help…i’m hoping there’s a way to do this, because my OCD won’t allow me to accept seeing the buttons change position on state change…lol

Posts: 1

Participants: 1

Read full topic


Help with my (almost) first automation

$
0
0

@lordslash wrote:

Hello, I am trying to write my first “real” automation. I’ll describe here a simple algorithm:

  • Trigger: Device state goes from “away” to “home” (it will be activated when I come back home through device tracker). This is easy and I’ve already achieved this with the following code:
  trigger:
  - entity_id: device_tracker.honor_10_8f45ce529244b93
    from: Away
    platform: state
    to: Home
  • if Google Home is turned off then turn Google Home on
  • if Google Home is playing music, use the service rest_command.assistant_broadcast (it doesn’t stop the music) and say “Welcome home!”
  • else: use the service tts.google_translate_say and say “Welcome home!”
  • if Google Home was turned off at the beginning, then turn Google Home off again

Is there a way to perform several if conditions one after the other and save the initial state of the google home in a variable?
Thank you very much in advance

Posts: 1

Participants: 1

Read full topic

Markdown card and colour text - possible?

$
0
0

@klogg wrote:

Is it possible to get color text in the markdown card?
I thought that markdown could contain HTML so I hoped this would work:

  - type: markdown
    content: Some Markdown text with <span style="color:blue">some *blue* text</span>.

But it doesn’t :frowning:

image

Posts: 2

Participants: 2

Read full topic

Add local images

$
0
0

@rajan wrote:

I have a local image stored in ‘/config/www/images/Sailboats.jpg’ and followed the documentation and added following in config.yaml:

camera:

  • platform: local_file
    file_path: /config/www/images/Sailboats.jpg

When I add a card (Picture) from configure UI what should I put in Image path?
I tried several option but don’t get the image.

Posts: 1

Participants: 1

Read full topic

Alternative to vertical stack in card?

$
0
0

@Matt_Barnes wrote:

I have updated HA recently, and made the move to HACS meaning I have newer versions of all my cards etc and noticed vertical-stack-in-card is not playing very nicely at all now.

I have seen a few posts particularly from @petro recommeding avoiding this method but am not sure how to get a similar result another way.

The latest issue is text seems to disappear but also its clear where the two cards within a card now are due to background colours.

These are my two cards (one card is Pi hole off/on and the ads block / dns queries, the other card is transmission, with two switches and the details below)

I will be able to (hopefully) work out the formatting of the ads blocked details (and am moving to adguard anyway) but the fact you can see the “join” between the cards and some other issues makes me think its time to find another method of getting the same result?

Anyone able to help?

Posts: 3

Participants: 3

Read full topic

Aeotec Multisensor 6 with Zstick Gen 5 and zwave2mqtt

$
0
0

@c0revin wrote:

Using the Multisensor 6 with zwave2mqtt is frustrating. But maybe you can help me by answering some of my questions below.

There are a lot of quirks when you look at the sensor readings and settings detected by zwave2mqtt and what is promoted to Home Assistant for auto discovery.
In the end I had to look at what zwave2mqtt detected, and what was sent to MQTT.

But I am not at all sure that what is detected is right:

Comment: PIR is configured to “Basic Set” not “Binary Sensor Report”, if this makes a difference.

  • binary_sensor_contact, 48/1/0, boolean, always reports “false”, but only together with other sensor values. Seems to have no function at all, at least I don’t see any immediate reports on this one, but maybe it is the tamper sensor that works differently? I thought it was about vibration sensing.

  • sensor_alarm_home_security, 113/1/7, no unit: always reports “unknown”, sends a report when motion is detected, so I assume it is the PIR motion detector. However, in zwave2mqtt log I find this:

2020-04-29 11:35:14.672 Detail, Node003,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x03, 0x03, 0x20, 0x01, 0x00, 0xd3
2020-04-29 11:35:14.672 Detail, 
2020-04-29 11:35:14.672 Info, Node003, ApplicationCommandHandler - Unhandled Command Class 0x20
2020-04-29 11:35:14.994 Detail, Node003,   Received: 0x01, 0x0f, 0x00, 0x04, 0x00, 0x03, 0x09, 0x71, 0x05, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x72
2020-04-29 11:35:14.995 Detail, 
2020-04-29 11:35:14.995 Warning, NotificationCCTypes::GetAlarmNotificationTypes - Unknown Alarm Type 7
2020-04-29 11:35:14.995 Warning, NotificationCCTypes::GetEventForAlarmType - Unknown AlarmType/Event 7/d
2020-04-29 11:35:14.996 Warning, NotificationCCTypes::GetAlarmType - Unknown AlarmType 7
2020-04-29 11:35:14.996 Info, Node003, Received Notification report (>v1): Type: Unknown (7) Event: Unknown (0) Status: true, Param Length: 0
2020-04-29 11:35:14.996 Detail, Node003, Refreshed Value: old value=0, new value=0, type=list
2020-04-29 11:35:14.997 Detail, Node003, Changes to this value are not verified
2020-04-29 11:35:14.997 Detail, Node003, Notification: ValueChanged
2020-04-29T09:35:14.998Z z2m:Zwave zwave node 3: changed: 113-1-7:Unknown:Unknown -> Unknown

Bottomline you get a state change from unknown to unknown, which is not helpful at all to detect the motion. Is is a bug in zwave2mqtt, is there a mapping missing somewhere? If I cannot do anything about it, what would you propose how to use such reports in home assistant to still get a state change for motion sensor entity?

Motion sensing is the most important part for me. If that does not work, all is lost with this sensor.

  • sensor_battery_level, 128/1/0, %: always 100 when on USB power, no batteries were included.

  • sensor_humidity_air, 49/1/5, RH: reports in deltas of 1, not sure how accurate the reported values are. This is somewhat interesting to display in the bathroom.

  • sensor_illuminance, 49/1/3, Lux: reports 0 in a dark room. 3 with some light, 127 with a flashlight in front of it. Not sure how accurate that is, but it seems to do something. This * sensor is the second most important to me for automation to determine how bright the light bulbs should illuminate.

  • sensor_sun_ultraviolet, 49/1/27, no unit: always 0 indoors AND outdoors. I don’t care about that sensor anyway.

  • sensor_temperature_air, 49/1/1, C: reports 5 degrees too high, calibration does not work (whatever I set as value for calibration, the setting will snap back to either 1 oder 255), insanely high threshold (3-112-1-41) of 1310976 and upper limit (3-112-1-49) of 18350336, and not possible to change them. Why these values, and why does it not update the values to what I am setting? Is my sensor broken or is there a problem with zwave2mqtt??

More quirks:

  • Trying to enable the change-threshold-based reporting (3-112-1-48) for temperature, illuminance, humidity etc. does not work. I was not able enable this for any of the defined change-thresholds. Is this a problem in zwave2mqtt or with the sensor?

  • The discovery JSON sent for Home Assistant auto discovery is missing the appropriate units.

Posts: 1

Participants: 1

Read full topic

Wifi dimmer mqtt template for hassio

$
0
0

@sandoz.cloud wrote:

i am running a tasmota wifi dimmer:

i have configured mqtt, thats working ok:
but how can i integrate it into hassio?
i am using this:

- platform: mqtt
  name: "TuyaDimTest"
  state_topic: "stat/keukendimmer/POWER"
  command_topic: "cmnd/keukendimmer/POWER"
  availability_topic: "tele/keukendimmer/LWT"
  brightness_state_topic: "stat/keukendimmer/RESULT"
  brightness_command_topic: "cmnd/keukendimmer/Dimmer"
  brightness_scale: 100
  brightness_value_template: >
    {% if value_json.Dimmer is defined %}
      {{ value_json.Dimmer }}
    {% else %}
      {% if state_attr('light.keukendimmer','brightness') == none %}
        0
      {% else %}
        {{ state_attr('light.keukendimmer','brightness') / 255 * 100 }}
      {% endif %}
    {% endif %}
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false

but getting this error:

ogboekdetails ( ERROR )

Logger: homeassistant.components.hassio
Integration: Hass.io (documentation, issues)
First occured: 12:12:16 (2 occurences)
Last logged: 12:19:15

Invalid config for [switch.mqtt]: [brightness_state_topic] is an invalid option for [switch.mqtt]. Check: switch.mqtt->brightness_state_topic. (See ?, line ?).

Posts: 1

Participants: 1

Read full topic

Issues with automations

$
0
0

@SwaggerBoy030 wrote:

Hi, I’m trying to set up an automatic message if there’s any movement when I’m not home. I want to make a sensor to indicate whether someone’s home or not, so if there’s any movement and the sensor state is false, I’ll get a message. I’m very new to YAML and so I don’t understand a lot of the errors. For example, I get this error message:

can not read an implicit mapping pair; a colon is missed at line 105, column 62:
     ... racker.joost_joost; != home -%}'

What do I need to do?

Here’s the sensor:

- platform: template
  sensors:
    someone_home:
      entity_id: device_tracker.joost_joost
      value_template: >-
      {{states.device_tracker.joost_joost}}:
      '{%- if states.device_tracker.joost_joost; != home -%}'
        false
      {%- else -%}
        true
      {%- endif -%}

Thanks!

Posts: 1

Participants: 1

Read full topic


Template sensor ERROR state_attr() missing 1 required positional argument: 'name'

$
0
0

@ASL07 wrote:

Hello,

I am having problems using a template sensor, I think I am missing something stupid but I can’t find out what. I hope you can help me with this.
I have the following template sensor:

- platform: template
    sensors:
      apartment_1_energy_kwh:
        entity_id: sensor.apartment_1_energy
        value_template: "{{ state_attr('sensor.apartment_1_energy') | float / 1000 }}"
        friendly_name: "Apartment 1 energy kWh"
        unit_of_measurement: kWh
      apartment_2_energy_kwh:
        value_template: "{{ state_attr('sensor.apartment_2_energy') | int / 1000 | round(2)}}"
        friendly_name: "Apartment 2 energy kWh"
        unit_of_measurement: kWh
      apartment_3_energy_kwh:
        value_template: "{{ state_attr('sensor.apartment_3_energy') | int / 1000 | round(2)}}"
        friendly_name: "Apartment 3 energy kWh"
        unit_of_measurement: kWh
      apartment_4_energy_kwh:
        value_template: "{{ state_attr('sensor.apartment_4_energy') | int / 1000 | round(2)}}"
        friendly_name: "Apartment 4 energy kWh"
        unit_of_measurement: kWh
      apartment_5_energy_kwh:
        value_template: "{{ state_attr('sensor.apartment_5_energy') | int / 1000 | round(2)}}"
        friendly_name: "Apartment 5 energy kWh"
        unit_of_measurement: kWh
      apartment_6_energy_kwh:
        value_template: "{{ state_attr('sensor.apartment_6_energy') | int / 1000 | round(2)}}"
        friendly_name: "Apartment 6 energy kWh"
        unit_of_measurement: kWh
      apartment_7_energy_kwh:
        value_template: "{{ state_attr('sensor.apartment_7_energy') | int / 1000 | round(2)}}"
        friendly_name: "Apartment 7 energy kWh"
        unit_of_measurement: kWh
      apartment_8_energy_kwh:
        value_template: "{{ state_attr('sensor.apartment_8_energy') | int / 1000 | round(2)}}"
        friendly_name: "Apartment 8 energy kWh"
        unit_of_measurement: kWh

The entities for this template sensor are defined here:

- platform: mqtt
    name: "Apartment 1 power"
    state_topic: "panel/sensor/apartment_1_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 1 energy"
    state_topic: "panel/sensor/apartment_1_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 1 power factor"
    state_topic: "panel/sensor/apartment_1_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

  - platform: mqtt
    name: "Apartment 2 power"
    state_topic: "panel/sensor/apartment_2_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 2 energy"
    state_topic: "panel/sensor/apartment_2_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 2 power factor"
    state_topic: "panel/sensor/apartment_2_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

  - platform: mqtt
    name: "Apartment 3 power"
    state_topic: "panel/sensor/apartment_3_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 3 energy"
    state_topic: "panel/sensor/apartment_3_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 3 power factor"
    state_topic: "panel/sensor/apartment_3_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

  - platform: mqtt
    name: "Apartment 4 power"
    state_topic: "panel/sensor/apartment_4_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 4 energy"
    state_topic: "panel/sensor/apartment_4_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 4 power factor"
    state_topic: "panel/sensor/apartment_4_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

  - platform: mqtt
    name: "Apartment 5 power"
    state_topic: "panel/sensor/apartment_5_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 5 energy"
    state_topic: "panel/sensor/apartment_5_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 5 power factor"
    state_topic: "panel/sensor/apartment_5_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

  - platform: mqtt
    name: "Apartment 6 power"
    state_topic: "panel/sensor/apartment_6_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 6 energy"
    state_topic: "panel/sensor/apartment_6_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 6 power factor"
    state_topic: "panel/sensor/apartment_6_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

  - platform: mqtt
    name: "Apartment 7 power"
    state_topic: "panel/sensor/apartment_7_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 7 energy"
    state_topic: "panel/sensor/apartment_7_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 7 power factor"
    state_topic: "panel/sensor/apartment_7_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

  - platform: mqtt
    name: "Apartment 8 power"
    state_topic: "panel/sensor/apartment_8_power/state"
    availability_topic: "panel/status"
    unit_of_measurement: "W"  
  - platform: mqtt
    name: "Apartment 8 energy"
    state_topic: "panel/sensor/apartment_8_energy/state"
    availability_topic: "panel/status"
    unit_of_measurement: "Wh"  
  - platform: mqtt
    name: "Apartment 8 power factor"
    state_topic: "panel/sensor/apartment_8_power_factor/state"
    availability_topic: "panel/status"
    unit_of_measurement: ""  

I think I have everything setup properly following the documentation, but I am getting the following error for my template sensor in home assistant log, and my template sensors are not working at all:

2020-04-29 11:59:17 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.apartment_5_energy_kwh fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 439, in async_device_update
    await self.async_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/template/sensor.py", line 238, in async_update
    self._state = self._template.async_render()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/template.py", line 215, in async_render
    return compiled.render(kwargs).strip()
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/sandbox.py", line 438, in call
    return __context.call(__obj, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/template.py", line 963, in wrapper
    return func(hass, *args[1:], **kwargs)
TypeError: state_attr() missing 1 required positional argument: 'name'

Posts: 1

Participants: 1

Read full topic

Is Media_Player (Media_Extractor) broken?

$
0
0

@aryankids wrote:

Hello Community,

I have no idea what did I do (in terms of the update as I have done a lot recently) but it seems that I cannot play any media on media_player service (or even media_extractor). Was wondering did you experience similar difficulties too?

I usually use node-red to run my automation scripts. First I notice the issue in there, spent hours fixing it with no joy. Then replicated the script in the native home_aassistant script editor and the result was the same.

The symptoms are,

  1. the communication between HA and the media player device takes place
  2. It seems that HA receives no error back from the player (logs are healthy)
  3. The player indicates that comms in progress by showing the cast logo (see attached)
  4. Yet nothing plays :frowning:

I tried it on Google nest, Bravia TV, and Volumio and the result was consistent. resetting devices and HA did not help.

Here is the simple script:

Action type
Call service

Service:
media_player.play_media
 
entity ID:
media_player.office_display

Service data:
entity_id: media_player.office_display
media_content_id: https://www.youtube.com/LINK_TO_A_VIDEO
media_content_type: video/youtube

Oh BTW, changing content type had no effect.

Have I missed something or the services is really broken?

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Tasmota / Home Assistant testing with a NodeMCU

$
0
0

@thejoefletch wrote:

I start this post with the fact that realize that ESPHome may be better suited to accomplish this (I will be testing that setup next), but I am using this as a learning experience to work with Tasmota and understand configuration and communications with Home Assistant.

With that being said, I have an ESP8266 NodeMCU that I have flashed with Tasmota and I am trying to read the status of the GPIO pins being opened / closed (in the hopes to monitor the status of say the states in a washer machine cycle).

I have Tasmota Configured like this.

MQTT is setup like this.

When I start the NodeMCU, the Tasmota console prints the following.

00:00:00 CFG: Loaded from flash at F6, Count 38
00:00:00 Project tasmota Tasmota Version 8.2.0(tasmota)-STAGE
00:00:00 WIF: Connecting to AP1 FF5 in mode 11N as tasmota_test-2713...
00:00:07 WIF: Connected
00:00:07 HTP: Web server active on tasmota_test-2713 with IP address 192.168.86.132
11:59:32 MQT: Attempting connection...
11:59:33 MQT: Connected
11:59:33 MQT: tele/tasmota_test/LWT = Online (retained)
11:59:33 MQT: cmnd/tasmota_test/POWER = 
11:59:33 MQT: tele/tasmota_test/INFO1 = {"Module":"Generic","Version":"8.2.0(tasmota)","FallbackTopic":"cmnd/DVES_D66A99_fb/","GroupTopic":"cmnd/tasmotas/"}
11:59:33 MQT: tele/tasmota_test/INFO2 = {"WebServerMode":"Admin","Hostname":"tasmota_test-2713","IPAddress":"192.168.86.132"}
11:59:33 MQT: tele/tasmota_test/INFO3 = {"RestartReason":"Software/System restart"}
11:59:36 MQT: tele/tasmota_test/STATE = {"Time":"2020-04-29T11:59:36","Uptime":"0T00:00:14","UptimeSec":14,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Wifi":{"AP":1,"SSId":"FF5","BSSId":"28:BD:89:F6:A1:6C","Channel":11,"RSSI":100,"Signal":-44,"LinkCount":1,"Downtime":"0T00:00:08"}}
11:59:36 MQT: tele/tasmota_test/SENSOR = {"Time":"2020-04-29T11:59:36","Switch1":"OFF","Switch2":"OFF","Switch3":"OFF"}

The tele/tasmota_test/SENSOR command is showing the status of the switches / GPIO pins.

When I close the GPIO pins 12, 13 and / or 14, I get the following command on the console.

12:01:46 MQT: cmnd/tasmota_test/POWER = ON
12:01:46 MQT: stat/tasmota_test/RESULT = {"Command":"Error"}

I’m not sure why there is a command error (could be from me messing around with other configuration), but the change in GPIO pin state executes a POWER = ON command and is not specific to the actual GPIO pins closed.

When Tasmota runs the tele/tasmota_test/SENSOR command, the console displays the following for the switch states which is correct.

tele/tasmota_test/SENSOR = {"Time":"2020-04-29T12:04:36","Switch1":"ON","Switch2":"OFF","Switch3":"OFF"}

Question 1: For troubleshooting purposes, how can I call the tele/tasmota_test/SENSOR command to get the sensor statuses instead of waiting for Tasmota to print that statement automatically?

Now working in Home Assistant, I have the following YAML setup…

binary_sensor:
  - platform: mqtt
    name: Switch1
    state_topic: "tele/tasmota_D66A99/SENSOR"
    value_template: "{{ value_json.Switch }}"

…but when changing the state of the GPIO pin, the status is not reflected in Home Assistant. I suspect that I have either the state_topic or the value_template (or more) not setup properly.

Question 2: In general, what am I going wrong here on the Home Assistant side?

Question 3: I’ve been at this on and off for a couple of days, still new and trying to learn as I go, but I keep failing with what I feel are some basic setups / concepts. Any suggestions on things to read / watch at this point to understand this further?

Posts: 1

Participants: 1

Read full topic

Template cover - how to get position in set_cover_position

$
0
0

@InToSSH wrote:

Hello,
I am trying to set up a template cover to control a tilt of other cover entity (by ESPHome), but I cannot figure out how to get the position in set_cover_position action, I tried to do {{position}} as the doc stated, but I got no value.

cover:
  - platform: template
    covers:
      living_room_cover_tilt:
        friendly_name: "Living Room Cover Tilt"
        position_template: "{{ state_attr('cover.living_room_cover', 'current_tilt_position') | int }}"
        availability_template: "{% if is_state('cover.living_room_cover', 'unavailable') %} false {% else %} true {% endif %}"
        entity_id: cover.living_room_cover_tilt
        device_class: blind
        open_cover:
          service: cover.open_cover_tilt
          data:
            entity_id: cover.living_room_cover
        close_cover:
          service: cover.close_cover_tilt
          data:
            entity_id: cover.living_room_cover
        set_cover_position:
          service: cover.set_cover_tilt_position
          data:
            entity_id: cover.living_room_cover
            tilt_position: "{{position}}"
          

Using this I get an error: Failed to call service cover/set_cover_position. expected int for dictionary value @ data['tilt_position']

I even tried to use MQTT to listen to the topic to see the actual value, but there is none.

set_cover_position:
          service: mqtt.publish
          data:
            topic: /test/cover
            payload_template: "{{position}}"

Also tried {{position | int}} as I noticed the position is a float, but that didn’t help.

Also the position_template doesn’t work, I want it to sync with the current tilt position of the cover.living_room_cover.

Can anyone help please?

If you are wondering why I am doing it like this it’s because Google Assistant doesn’t support tilt setting, so I want to expose another entity for tilt.

Posts: 2

Participants: 2

Read full topic

Combine cards in front end

$
0
0

@Eldudemeister wrote:

I’m looking to combine two cards in my front end, one is a mark down card and the other is a custom mini graph card in horizontal stack. The code for both cards is below and I’m hopnig this is possible but can someone point me in the right direction please?

content: |
  ## Sever Stats
style: |
  ha-card {
     margin: 0px 0px 0px 0px;
   }
   h2 {
     font-size: 18px;
     font-weight: 400;
     padding-left: 10px;
     border-left: 3px solid rgba(81, 134, 236);
   }
type: markdown
border-left: '3px solid rgba(81, 134, 236)'
cards:
  - entities:
      - sensor.glances_cpu_used
    font_size: 75
    line_color: blue
    line_width: 8
    type: 'custom:mini-graph-card'
  - entities:
      - sensor.glances_ram_used_percent
    font_size: 75
    line_color: '#e74c3c'
    line_width: 8
    type: 'custom:mini-graph-card'
  - entities:
      - sensor.glances_data_used
    font_size: 75
    line_color: var(--accent-color)
    line_width: 8
    type: 'custom:mini-graph-card'
font-size: 18px;
font-weight: 400;
margin: 0px 0px 0px 0px;
padding-left: 10px;
type: horizontal-stack

Posts: 2

Participants: 2

Read full topic

Viewing all 108029 articles
Browse latest View live


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