Skip to content

Bump hatasmota to 0.0.27#42802

Merged
emontnemery merged 5 commits intohome-assistant:devfrom
emontnemery:tasmota_fix_buttons_switches
Nov 8, 2020
Merged

Bump hatasmota to 0.0.27#42802
emontnemery merged 5 commits intohome-assistant:devfrom
emontnemery:tasmota_fix_buttons_switches

Conversation

@emontnemery
Copy link
Copy Markdown
Contributor

@emontnemery emontnemery commented Nov 3, 2020

Proposed change

Bump hatasmota from 0.0.26 to 0.0.27
This fixes buttons and switches and adds some additional status sensors.

Changes:

emontnemery/hatasmota@0.0.26...0.0.27

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@emontnemery emontnemery changed the title WIP: Fix Tasmota buttons and switches Bump hatasmota from 0.0.27 Nov 4, 2020
@gregoryduckworth
Copy link
Copy Markdown

Played around with this as I was having issues with switches and works wonderfully! Thanks @emontnemery.

SENSOR_STATUS_RESTART: {ICON: "mdi:information-outline"},
SENSOR_STATUS_SIGNAL: {DEVICE_CLASS: DEVICE_CLASS_SIGNAL_STRENGTH},
SENSOR_STATUS_RSSI: {ICON: "mdi:access-point"},
SENSOR_STATUS_UPTIME: {ICON: "mdi:progress-clock"},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason this changed from DEVICE_CLASS_TIMESTAMP? there may be some differences in frontend formatting without such.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's because the uptime is not a timestamp, it measures elapsed time.

Copy link
Copy Markdown
Contributor

@effelle effelle Nov 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uptime has its own format: [n days]T[hh:mm:ss].

{"Uptime":"3T13:38:27"}

To have it working as DEVICE_CLASS_TIMESTAMP a conversion is needed by our side and frankly doesn't worth the effort since is already showing a clear information.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while it may seem not worth it, this is going to create a lot of state changes which is why using timestamp is preferrred as you would only set the last boot time

Copy link
Copy Markdown
Contributor Author

@emontnemery emontnemery Nov 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that's a good point. Storing the timestamp of last restart would be enough, but it's maybe not so user friendly for display?

Edit: Maybe a solution could be to truncate the uptime to full hours to prevent spamming a lot of state changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our standard is to use device class timestamp for these cases. Please convert the time to an absolute time if needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Martin, we'll get that sorted in next hatasmota version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected in #43013

@emontnemery emontnemery merged commit 51b4bc5 into home-assistant:dev Nov 8, 2020
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2020
@emontnemery emontnemery changed the title Bump hatasmota from 0.0.27 Bump hatasmota to 0.0.27 Nov 10, 2020
@emontnemery emontnemery deleted the tasmota_fix_buttons_switches branch February 8, 2021 13:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants