New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ocr.png to ssocr-(entity_name).png to allow multiple instances #18634

Merged
merged 4 commits into from Dec 20, 2018

Conversation

Projects
None yet
5 participants
@jumpkick
Copy link
Contributor

jumpkick commented Nov 22, 2018

A patch that addresses #18633, allowing multiple seven segments instances to have their own uniquely named ocr.png files.

Description
Have Seven Segments use a unique file name instead of home-assistant-config-dir/ocr.png to allow multiple instances to run without constantly overwriting each other's ssocr image input data.

Breaking Change
seven_segments will incorporate the entity name into the file name changing from former hardcoded ocr.png to ssocr-(ss_entity_name).png to make each ssocr input data file unique.

@@ -69,7 +69,7 @@ def __init__(self, hass, camera_entity, config, name):
split_entity_id(camera_entity)[1])
self._state = None

self.filepath = os.path.join(self.hass.config.config_dir, 'ocr.png')
self.filepath = os.path.join(self.hass.config.config_dir, 'ssocr-' + self._name.replace(' ','_') + '.png')

This comment has been minimized.

@houndci-bot

houndci-bot Nov 22, 2018

line too long (114 > 79 characters)
missing whitespace after ','

@@ -69,7 +69,8 @@ def __init__(self, hass, camera_entity, config, name):
split_entity_id(camera_entity)[1])
self._state = None

self.filepath = os.path.join(self.hass.config.config_dir, 'ocr.png')
self.filepath = os.path.join(self.hass.config.config_dir, 'ssocr-' +

This comment has been minimized.

@houndci-bot

houndci-bot Nov 22, 2018

trailing whitespace

@fabaff fabaff changed the title * Rename ocr.png to ssocr-(entity_name).png to allow multiple instances Rename ocr.png to ssocr-(entity_name).png to allow multiple instances Nov 22, 2018

@fabaff

This comment has been minimized.

Copy link
Member

fabaff commented Nov 25, 2018

This is a breaking change. It requires a description for the releases notes.

@fabaff

This comment has been minimized.

Copy link
Member

fabaff commented Dec 1, 2018

Paragraph for the release notes is still missing.

@fabaff fabaff dismissed their stale review Dec 4, 2018

Paragraph for the release notes is missing.

@fabaff

This comment has been minimized.

Copy link
Member

fabaff commented Dec 14, 2018

@jumpkick, could you please rebase your branch and add a paragraph for the release notes?

jumpkick added some commits Nov 22, 2018

* Rename ocr.png to ssocr-(entity_name).png to allow multiple seven_s…
…egments instances to run without overwrting each other's data.

@jumpkick jumpkick force-pushed the jumpkick:dev branch from 08aef01 to 6cf61c5 Dec 15, 2018

@jumpkick

This comment has been minimized.

Copy link
Contributor

jumpkick commented Dec 15, 2018

@fabaff Updated pull description... let me know if it's ok or if I need to fix/redo something. 👍

@cgarwood cgarwood merged commit dcf925a into home-assistant:dev Dec 20, 2018

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 92.889%
Details

@wafflebot wafflebot bot removed the in progress label Dec 20, 2018

mxworm added a commit to mxworm/home-assistant that referenced this pull request Dec 21, 2018

Merge branch 'dev' into current
* dev: (75 commits)
  Add native ESPHome Home Assistant state feature (home-assistant#19429)
  Add new sensor platform to expose Islamic prayer times (home-assistant#19444)
  Add timeout to RainMachine login (home-assistant#19476)
  Reorder FLOW entries in config_entries.py (home-assistant#19475)
  Update pynetgear to 0.5.2 (home-assistant#19490)
  Rename ocr.png to ssocr-(entity_name).png to allow multiple instances (home-assistant#18634)
  Add Mythic Beasts DNSAPI Component (home-assistant#18333)
  Adds battery_percent which had been introduced with pyatmo 1.4 and resolves unknown var warning. (home-assistant#19309)
  Bump Pybotvac To Support D7 On Latest Firmware (home-assistant#19463)
  Add device registry to MQTT alarm control panel (home-assistant#19331)
  Add device registry to MQTT lock (home-assistant#19333)
  Bump pyharmony (home-assistant#19460)
  Add testcase test_entity_id_update
  Add device registry to MQTT climate
  Updated frontend to 20181219.0
  Update translations
  ZHA entity ZCL reporting configuration (home-assistant#19177)
  Use web sockets for Harmony HUB (home-assistant#19440)
  Correct calls to subscription.async_unsubscribe_topics (home-assistant#19414)
  Various updates (home-assistant#19449)
  ...

dshokouhi added a commit to dshokouhi/home-assistant that referenced this pull request Dec 25, 2018

Rename ocr.png to ssocr-(entity_name).png to allow multiple instances (
…home-assistant#18634)

* * Rename ocr.png to ssocr-(entity_name).png to allow multiple seven_segments instances to run without overwrting each other's data.

* Update seven_segments.py

* Update seven_segments.py

* Use string formatting

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment