Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed May 11, 2023
2 parents d205da9 + 9f7c2d2 commit 2f9ea17
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup git
run: |
git config user.email "ci@roode.de"
git config user.name "CI"
- name: Prepare description
run: |
csplit -s CHANGELOG.md "/##/" {1}
cat xx01 > CHANGELOG.tmp
- name: Prepare tag
run: |
export TAG=$(head -1 CHANGELOG.tmp | cut -d' ' -f2)
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Create Release
uses: ncipollo/release-action@v1
with:
Expand All @@ -33,3 +37,11 @@ jobs:
draft: false
prerelease: false
generateReleaseNotes: true

- name: Discord notification
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
TAG_NAME: ${{ env.TAG }}
with:
args: "A new release has been published! https://github.com/Lyr3x/Roode/releases/tag/{{TAG_NAME}}"
2 changes: 1 addition & 1 deletion components/roode/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
cv.Optional(CONF_PEOPLE_COUNTER): PERSISTED_NUMBER_SCHEMA.extend(
{
cv.Optional(CONF_ICON, default="mdi:counter"): cv.icon, # new default
cv.Optional(CONF_MAX_VALUE, 10): cv.int_range(1, 255),
cv.Optional(CONF_MAX_VALUE, 10): cv.int_range(-128, 128),
}
),
}
Expand Down
4 changes: 3 additions & 1 deletion components/roode/roode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ void Roode::updateCounter(int delta) {
}
auto next = this->people_counter->state + (float) delta;
ESP_LOGI(TAG, "Updating people count: %d", (int) next);
this->people_counter->set(next);
auto call = this->people_counter->make_call();
call.set_value(next);
call.perform();
}
void Roode::recalibration() { calibrate_zones(); }

Expand Down
8 changes: 4 additions & 4 deletions components/roode/text_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
CONFIG_SCHEMA = cv.Schema(
{
cv.GenerateID(CONF_ROODE_ID): cv.use_id(Roode),
cv.Optional(VERSION): text_sensor.TEXT_SENSOR_SCHEMA.extend(
cv.Optional(VERSION): text_sensor.text_sensor_schema().extend(
{
cv.Optional(CONF_ICON, default="mdi:git"): text_sensor.icon,
cv.Optional(CONF_ICON, default="mdi:git"): cv.icon,
cv.GenerateID(): cv.declare_id(text_sensor.TextSensor),
cv.Optional(
CONF_ENTITY_CATEGORY, default=ENTITY_CATEGORY_DIAGNOSTIC
): cv.entity_category,
}
),
cv.Optional(ENTRY_EXIT_EVENT): text_sensor.TEXT_SENSOR_SCHEMA.extend(
cv.Optional(ENTRY_EXIT_EVENT): text_sensor.text_sensor_schema().extend(
{
cv.Optional(CONF_ICON, default="mdi:sign-direction"): text_sensor.icon,
cv.Optional(CONF_ICON, default="mdi:sign-direction"): cv.icon,
cv.GenerateID(): cv.declare_id(text_sensor.TextSensor),
cv.Optional(
CONF_ENTITY_CATEGORY, default=ENTITY_CATEGORY_DIAGNOSTIC
Expand Down

0 comments on commit 2f9ea17

Please sign in to comment.