MycroftAI / skill-homeassistant

Mycroft Skill/Integration for Homeassistant
GNU Lesser General Public License v3.0
115 stars 62 forks source link

Duplicate dialog #92

Open krisgesling opened 2 years ago

krisgesling commented 2 years ago

Describe the bug User on the Forums is reporting that they get dialog duplicated as output:

“Successfully set thermostat to 70 none, successfully set thermostat to 70 none”

It's also reporting "None" for presumably the unit of measure.

To Reproduce Full details here: https://community.mycroft.ai/t/mycroft-speaks-twice-with-homeassistant-confirmations/11428/2

Expected behavior Single dialog reported back.

Tony763 commented 2 years ago

Returning None should not occur with latest version. We will see if sparkyvision give us some more feedback.

I only found problem within __init__.py line 576, when HA do not return current temp. Intent get value of sensor:

File "/srv/mycroft-core/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
    handler(message)
  File "/opt/mycroft/skills/skill-homeassistant.mycroftai/__init__.py", line 215, in handle_sensor_intent
    self._handle_sensor(message)
  File "/opt/mycroft/skills/skill-homeassistant.mycroftai/__init__.py", line 576, in _handle_sensor
    current_temp = nice_number((float(attributes['current_temperature'])))
TypeError: float() argument must be a string or a number, not 'NoneType'

image

We will have to divide response dialogs.

pfefferle commented 2 years ago

We will have to divide response dialogs.

Makes sense! This was also a feedback of @krisgesling https://github.com/MycroftAI/skill-homeassistant/pull/82#discussion_r728653195

Tony763 commented 2 years ago

I will prepare it tonight, I will just need translations to DE.

pfefferle commented 2 years ago

I can help with german translations.

Tony763 commented 2 years ago

@pfefferle PR ready, could You add translations and test it out? Tony763:feature/issue92

pfefferle commented 2 years ago

@Tony763 sure, will do it later today.

Tony763 commented 1 year ago

Wow, this one ended a half way. I missed Your PR with translations.

I will try to update changes with actual code base.